From bc739739e0db95af9aaa3a3cb192b21d40be03be Mon Sep 17 00:00:00 2001 From: Maxim Kadushkin Date: Tue, 24 Aug 2021 14:52:46 +0300 Subject: [PATCH] [themes] correct theme id in system with drak theme --- apps/common/main/lib/controller/Themes.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/apps/common/main/lib/controller/Themes.js b/apps/common/main/lib/controller/Themes.js index deac83858..e2a7deabf 100644 --- a/apps/common/main/lib/controller/Themes.js +++ b/apps/common/main/lib/controller/Themes.js @@ -229,8 +229,11 @@ define([ if ( !(Common.Utils.isIE10 || Common.Utils.isIE11) ) for (var i of document.body.classList.entries()) { if ( i[1].startsWith('theme-') && !i[1].startsWith('theme-type-') ) { - theme_name = i[1]; - break; + if ( themes_map[i[1]] ) { + theme_name = i[1]; + Common.localStorage.setItem('ui-theme-id', theme_name); + break; + } } } }