Apply default settings before existing ones.
This commit is contained in:
parent
1493b2c96b
commit
51db617b77
|
@ -13,8 +13,8 @@ export default class Settings {
|
||||||
const sync = (await browser.storage.sync.get(
|
const sync = (await browser.storage.sync.get(
|
||||||
defaultsObject,
|
defaultsObject,
|
||||||
)) as typeof defaultsObject;
|
)) as typeof defaultsObject;
|
||||||
settings.data = sync.data;
|
settings.data = {...settings.data, ...sync.data};
|
||||||
settings.features = sync.features;
|
settings.features = {...settings.features, ...sync.features};
|
||||||
|
|
||||||
return settings;
|
return settings;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue