One can pass a default Object to storage.get() which will be used for keys that don't exist.
However, it doesn't do that recursively, so when we add a new settings key for a specific module, like the addToRecentDocuments it will not be present for anyone who already touched the extension settings.
Details
Details
- Reviewers
fvogt - Group Reviewers
Plasma - Commits
- R856:f4aa77a29780: Manually merge stored and default settings
- Added a new key to an existing module setting, got the key show up. The other settings seem unaffected.
Diff Detail
Diff Detail
- Repository
- R856 Plasma Browser Integration
- Lint
Lint Skipped - Unit
Unit Tests Skipped
Comment Actions
Just have to make sure not to add anything to DEFAULT_EXTENSION_SETTINGS.mpris.websiteSettings now. Previously that would've been ignored.
extension/utils.js | ||
---|---|---|
39 | Why not if/else? |
extension/utils.js | ||
---|---|---|
39 | I'd invert the condition |