Fixed bug where on firefox the options upgrader was being ran more than once

This commit is contained in:
Hygna 2022-10-11 15:50:33 +01:00
parent b3beccd998
commit c60e6f2c52
No known key found for this signature in database
1 changed files with 7 additions and 3 deletions

View File

@ -33,9 +33,13 @@ browser.runtime.onInstalled.addListener(details => {
switch (details.previousVersion) {
case "2.2.0":
case "2.2.1":
await generalHelper.initDefaults()
await servicesHelper.initDefaults()
await servicesHelper.upgradeOptions()
browser.storage.local.get("options", async r => {
if (!r.options) {
await generalHelper.initDefaults()
await servicesHelper.initDefaults()
await servicesHelper.upgradeOptions()
}
})
break
default:
await servicesHelper.processUpdate()