[themes] refactoring

This commit is contained in:
Maxim Kadushkin 2021-04-26 10:53:52 +03:00
parent f5bff00038
commit 66dba701d8

View file

@ -209,7 +209,9 @@ define([
})
this.api = api;
var theme_name = Common.localStorage.getItem('ui-theme') || id_default_light_theme;
var theme_name = Common.localStorage.getItem('ui-theme');
if ( !!themes_map[theme_name] )
theme_name = id_default_light_theme;
if ( !$('body').hasClass(theme_name) ) {
$('body').addClass(theme_name);