From 0122efcbc8f4bd52de07514892ab763909609c33 Mon Sep 17 00:00:00 2001 From: KoloMl Date: Fri, 9 Aug 2024 00:22:56 +0400 Subject: [PATCH] Fixed asserting throwing an error when user is not logged in This selector is optional and does not exist for the not-logged-in users. We don't really need to assert it existence in this case. --- assets/js/settings.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/js/settings.ts b/assets/js/settings.ts index c60a2ee0..a294c48a 100644 --- a/assets/js/settings.ts +++ b/assets/js/settings.ts @@ -10,7 +10,7 @@ export function setupSettings() { if (!$('#js-setting-table')) return; const localCheckboxes = $$('[data-tab="local"] input[type="checkbox"]'); - const themeSelect = assertNotNull($('#user_theme')); + const themeSelect = $('#user_theme'); const styleSheet = assertNotNull($('head link[rel="stylesheet"]')); // Local settings