From dc71fa04a00ed1f5b250d909528cb6473484bd97 Mon Sep 17 00:00:00 2001 From: Hygna Date: Tue, 11 Oct 2022 16:53:06 +0100 Subject: [PATCH] Fixed bug where on settings import the extension would no longer function --- src/pages/options/widgets/general.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/pages/options/widgets/general.js b/src/pages/options/widgets/general.js index cba46de..75701bc 100644 --- a/src/pages/options/widgets/general.js +++ b/src/pages/options/widgets/general.js @@ -87,9 +87,8 @@ importSettingsElement.addEventListener("change", () => { }) }) ) - } else if ("version" in data) { - browser.storage.local.clear(() => browser.storage.local.set({ options: data }, () => location.reload())) - } else { + } else if ("version" in data) browser.storage.local.set({ options: data }, () => location.reload()) + else { console.log("incompatible settings") importError() }