From 51db617b77b26c37869b0a618c8a7a6ce6820ed0 Mon Sep 17 00:00:00 2001 From: Bauke Date: Thu, 24 Feb 2022 13:55:47 +0100 Subject: [PATCH] Apply default settings before existing ones. --- source/settings.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/settings.ts b/source/settings.ts index 133db79..a8e26c1 100644 --- a/source/settings.ts +++ b/source/settings.ts @@ -13,8 +13,8 @@ export default class Settings { const sync = (await browser.storage.sync.get( defaultsObject, )) as typeof defaultsObject; - settings.data = sync.data; - settings.features = sync.features; + settings.data = {...settings.data, ...sync.data}; + settings.features = {...settings.features, ...sync.features}; return settings; }