Fixed bug where on settings import the extension would no longer function

This commit is contained in:
Hygna 2022-10-11 16:53:06 +01:00
parent 8df59a5b6e
commit dc71fa04a0
No known key found for this signature in database

View File

@ -87,9 +87,8 @@ importSettingsElement.addEventListener("change", () => {
}) })
}) })
) )
} else if ("version" in data) { } else if ("version" in data) browser.storage.local.set({ options: data }, () => location.reload())
browser.storage.local.clear(() => browser.storage.local.set({ options: data }, () => location.reload())) else {
} else {
console.log("incompatible settings") console.log("incompatible settings")
importError() importError()
} }