diff --git a/app/static/js/header.js b/app/static/js/header.js index e50586b..e3c8d2c 100644 --- a/app/static/js/header.js +++ b/app/static/js/header.js @@ -25,7 +25,12 @@ document.addEventListener("DOMContentLoaded", () => { localStorage.advSearchToggled = on; } - toggleAdvancedSearch(JSON.parse(localStorage.advSearchToggled)); + try { + toggleAdvancedSearch(JSON.parse(localStorage.advSearchToggled)); + } catch (error) { + console.warn("Did not recover advanced search toggle state"); + } + advSearchToggle.onclick = () => { toggleAdvancedSearch(advSearchToggle.checked); }