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.
This commit is contained in:
KoloMl 2024-08-09 00:22:56 +04:00
parent 2a89162cba
commit 0122efcbc8

View file

@ -10,7 +10,7 @@ export function setupSettings() {
if (!$('#js-setting-table')) return;
const localCheckboxes = $$<HTMLInputElement>('[data-tab="local"] input[type="checkbox"]');
const themeSelect = assertNotNull($<HTMLSelectElement>('#user_theme'));
const themeSelect = $<HTMLSelectElement>('#user_theme');
const styleSheet = assertNotNull($<HTMLLinkElement>('head link[rel="stylesheet"]'));
// Local settings