Fixed private windows always falling back to Vintage Blue theme (thanks barbaz for report).
This commit is contained in:
parent
7943e8f862
commit
59bfcbcab5
|
@ -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;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue