-
-
Notifications
You must be signed in to change notification settings - Fork 155
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
Docs missing how to deal with defaults for properties of an object (in schema) #102
Comments
From sindresorhus/conf#85 (comment) the solution is to add bar: {
type: 'object',
properties: {
a: {
type: 'number',
default: 5
}
},
default: {}
} console.log(store.get('bar.a'));
//=> 5 Perhaps README could be updated to show this? |
binaryfunt
changed the title
Schema object property defaults not working
Docs missing how to deal with defaults for properties of an object
Mar 1, 2020
binaryfunt
changed the title
Docs missing how to deal with defaults for properties of an object
Docs missing how to deal with defaults for properties of an object (in schema)
Mar 1, 2020
Thank you, @binaryfunt! Agreed, this is exactly what I was struggling with. |
Same problem here. Thanks for the help. :) 👍 |
Gosh I've been debugging for 3 hours and here is the answer Thank you! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I figured this out but will post the issue and show the solution in reply
The text was updated successfully, but these errors were encountered: