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;
if (reason !== "update") return;
try {
await LifeBoat.retrieveAndDestroy();
} catch (e) {
error(e);
if (reason === "update") {
try {
await LifeBoat.retrieveAndDestroy();
} catch (e) {
error(e);
}
}
if (!previousVersion) return;
await include("/lib/Ver.js");
previousVersion = new Ver(previousVersion);
let currentVersion = new Ver(browser.runtime.getManifest().version);