Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getSchema() broken in 6.0.0 #376

Closed
MrBartusek opened this issue May 15, 2020 · 3 comments
Closed

getSchema() broken in 6.0.0 #376

MrBartusek opened this issue May 15, 2020 · 3 comments

Comments

@MrBartusek
Copy link

getSchema works differently now and migration guide not that;

that code worked before 6.0:

if(!Config.data.getSchema().properties[key]) throw new Error(`'${key}' value don't exist in config schema while something tried to access it`);

now it must be:

if(!Config.data.getSchema()._cvtProperties[key]) throw new Error(`'${key}' value don't exist in config schema while something tried to access it`);

I don't think that's intended

@A-312
Copy link
Contributor

A-312 commented May 16, 2020

properties was replaced by _cvtProperties to allow the word properties in your config. ;) In 6.0, properties was a private word.

@A-312
Copy link
Contributor

A-312 commented May 16, 2020

Also 6.0.0 is partial version of wanted changes, because the next version >=7.0 should be have different behavior with getSchema() to do something like that: !Config.data.getSchema()[key]

@madarche
Copy link
Collaborator

Thanks @A-312!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants