From 040af97c114adc9426a3db427aff31c3fa38c464 Mon Sep 17 00:00:00 2001 From: Jennifer Richards Date: Wed, 25 Jan 2023 17:09:13 -0400 Subject: [PATCH] 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 --- ietf/static/js/document_html.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ietf/static/js/document_html.js b/ietf/static/js/document_html.js index 53ca6bf549..7de6660c23 100644 --- a/ietf/static/js/document_html.js +++ b/ietf/static/js/document_html.js @@ -62,8 +62,7 @@ document.addEventListener("DOMContentLoaded", function (event) { const val = in_localStorage.includes(btn.name) ? localStorage.getItem(btn.name) : cookies.get(btn.name); - if (val == id || ((val == undefined || val == null) && - btn_pref[btn.name] == id)) { + if (val === id || (val === null && btn_pref[btn.name] === id)) { btn.checked = true; }