First, I set a defaults value when init the Storage
object like this:
const defaults = {
config: {
node: {
list: [
'node1',
'node2',
'node3'
],
current: 'node1'
},
language: 'en'
}
}
const storage = new Storage({
defaults
});
this default values will be generated after my app launches for the first time.
but then, I modify config.json
manually, delete the value for key config.node
, save file.
after that, content in config.json is:
{
"config": {
"language": "en"
}
}
then I launch my app, storage.get("config.node")
return undefined, I think it will regenerate the default value after I delete them, but it doesn't.
Is this a bug?
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too