Fixed configuration upgrades not applied on manual updates (thanks Nan for reporting).

This commit is contained in:
hackademix 2021-03-11 21:52:57 +01:00
parent 1bfc51226c
commit 354dbeabbd
1 changed files with 8 additions and 6 deletions

View File

@ -219,14 +219,16 @@ var LifeCycle = (() => {
} }
let {reason, previousVersion} = details; let {reason, previousVersion} = details;
if (reason !== "update") return; if (reason === "update") {
try {
try { await LifeBoat.retrieveAndDestroy();
await LifeBoat.retrieveAndDestroy(); } catch (e) {
} catch (e) { error(e);
error(e); }
} }
if (!previousVersion) return;
await include("/lib/Ver.js"); await include("/lib/Ver.js");
previousVersion = new Ver(previousVersion); previousVersion = new Ver(previousVersion);
let currentVersion = new Ver(browser.runtime.getManifest().version); let currentVersion = new Ver(browser.runtime.getManifest().version);