From caf5d182380f0ddcbbf31b3a93a03015645819ec Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Thu, 28 Jul 2022 14:26:09 -0400 Subject: [PATCH] fix: fallbacks for navbar hiding --- public/settings.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/settings.js b/public/settings.js index ae38497..5e2359a 100644 --- a/public/settings.js +++ b/public/settings.js @@ -18,7 +18,7 @@ define('forum/account/theme', ['forum/account/header', 'storage', 'settings', 'a document.getElementById('persona:menus:legacy-layout').checked = sidebarSwapped; try { - const parsed = JSON.parse(autohideNavbarEnvs); + const parsed = JSON.parse(autohideNavbarEnvs) || ['xs', 'sm']; parsed.forEach((env) => { const optionEl = document.getElementById('persona:navbar:autohide').querySelector(`option[value="${env}"]`); optionEl.selected = true;