From b734363811bd4e4e1fe16c85dafe5755562c680b Mon Sep 17 00:00:00 2001 From: maxkadushkin Date: Tue, 7 Feb 2023 15:30:00 +0300 Subject: [PATCH] [all] fix bug 61071 --- apps/common/main/lib/util/htmlutils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/common/main/lib/util/htmlutils.js b/apps/common/main/lib/util/htmlutils.js index 16a5b18a5a..8db37206ff 100644 --- a/apps/common/main/lib/util/htmlutils.js +++ b/apps/common/main/lib/util/htmlutils.js @@ -91,7 +91,7 @@ if ( !!params.uitheme && checkLocalStorage && !localStorage.getItem("ui-theme-id var ui_theme_name = checkLocalStorage && localStorage.getItem("ui-theme-id") ? localStorage.getItem("ui-theme-id") : params.uitheme; var ui_theme_type; if ( !ui_theme_name ) { - if ( (desktop && desktop.theme && desktop.theme.system == 'dark') || + if ( (window.desktop && desktop.theme && desktop.theme.system == 'dark') || (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) ) { ui_theme_name = 'theme-dark';