Fixed private windows always falling back to Vintage Blue theme (thanks barbaz for report).

This commit is contained in:
hackademix 2022-11-20 22:05:21 +01:00
parent 7943e8f862
commit 59bfcbcab5
No known key found for this signature in database
GPG Key ID: 231A83AFDA9C2434
1 changed files with 3 additions and 3 deletions

View File

@ -125,11 +125,11 @@
async isVintage() { async isVintage() {
let ret; let ret;
if (localStorage) { if (localStorage) {
ret = localStorage && localStorage.getItem(VINTAGE); ret = localStorage.getItem(VINTAGE);
if (ret !== null) return !!ret; if (ret !== null) return !(ret === "false" || !ret);
} }
ret = (await browser.storage.local.get([VINTAGE]))[VINTAGE]; ret = (await browser.storage.local.get([VINTAGE]))[VINTAGE];
if (localStorage && typeof ret === "boolean") localStorage.setItem(VINTAGE, ret); if (localStorage && typeof ret === "boolean") localStorage.setItem(VINTAGE, ret || "");
return ret; return ret;
}, },