[themes] fix bug 52520

This commit is contained in:
Maxim Kadushkin 2021-09-13 14:20:42 +03:00
parent 301d2955b8
commit 8aa2a51e3d

View file

@ -227,16 +227,14 @@ define([
var theme_name = get_ui_theme_name(Common.localStorage.getItem('ui-theme')); var theme_name = get_ui_theme_name(Common.localStorage.getItem('ui-theme'));
if ( !theme_name ) { if ( !theme_name ) {
if ( !(Common.Utils.isIE10 || Common.Utils.isIE11) ) if ( !(Common.Utils.isIE10 || Common.Utils.isIE11) )
for (var i of document.body.classList.entries()) { document.body.classList.forEach(function (classname, i, o) {
document.body.classList.forEach(function (classname, i, o) { if ( !theme_name && classname.startsWith('theme-') &&
if ( !theme_name && classname.startsWith('theme-') && !classname.startsWith('theme-type-') && themes_map[classname] )
!classname.startsWith('theme-type-') && themes_map[classname] ) {
{ theme_name = classname;
theme_name = classname; Common.localStorage.setItem('ui-theme-id', theme_name);
Common.localStorage.setItem('ui-theme-id', theme_name); }
} });
});
}
} }
if ( !themes_map[theme_name] ) if ( !themes_map[theme_name] )