refactor: Simplify tests and comply with StandardJS style (#5026)
* refactor: Simplify tests and comply with StandardJS style Use === instead of ==, except where it's used to match both null and undefined. * style: further tweaks
This commit is contained in:
parent
61f7984d5c
commit
040af97c11
|
@ -62,8 +62,7 @@ document.addEventListener("DOMContentLoaded", function (event) {
|
||||||
|
|
||||||
const val = in_localStorage.includes(btn.name) ?
|
const val = in_localStorage.includes(btn.name) ?
|
||||||
localStorage.getItem(btn.name) : cookies.get(btn.name);
|
localStorage.getItem(btn.name) : cookies.get(btn.name);
|
||||||
if (val == id || ((val == undefined || val == null) &&
|
if (val === id || (val === null && btn_pref[btn.name] === id)) {
|
||||||
btn_pref[btn.name] == id)) {
|
|
||||||
btn.checked = true;
|
btn.checked = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue