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
1 changed files with 2 additions and 3 deletions

View File

@ -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()
}