[themes] refactoring. skip es6 syntax

This commit is contained in:
Maxim Kadushkin 2021-09-03 12:25:52 +03:00
parent 6bc4ef744f
commit b2777666b8

View file

@ -249,12 +249,11 @@ define([
var theme_name = get_ui_theme_name(Common.localStorage.getItem('ui-theme'));
if ( !theme_name ) {
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;
document.body.classList.forEach(function (classname, i, o) {
if ( !theme_name && classname.startsWith('theme-') && !classname.startsWith('theme-type-') ) {
theme_name = classname;
}
}
});
}
if ( !themes_map[theme_name] )