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() {
|
||||
let ret;
|
||||
if (localStorage) {
|
||||
ret = localStorage && localStorage.getItem(VINTAGE);
|
||||
if (ret !== null) return !!ret;
|
||||
ret = localStorage.getItem(VINTAGE);
|
||||
if (ret !== null) return !(ret === "false" || !ret);
|
||||
}
|
||||
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;
|
||||
},
|
||||
|
||||
|
|
Loading…
Reference in New Issue