[common] fix for IE

This commit is contained in:
maxkadushkin
2023-10-17 22:18:54 +03:00
parent cef3193c30
commit ad036d4ccb

View File

@ -64,8 +64,8 @@
let objtheme = window.uitheme.colors ? window.uitheme : localStorage.getItem("ui-theme");
if ( !!objtheme ) {
if ( typeof(objtheme) == 'string' &&
objtheme.startsWith("{") && objtheme.endsWith("}") )
if ( typeof(objtheme) == 'string' && objtheme.lastIndexOf("{", 0) === 0 &&
objtheme.indexOf("}", objtheme.length - 1) !== -1 )
{
objtheme = JSON.parse(objtheme);
}