From ad036d4ccb91ea0804ecc879b6adcd3840d03833 Mon Sep 17 00:00:00 2001 From: maxkadushkin Date: Tue, 17 Oct 2023 22:18:54 +0300 Subject: [PATCH] [common] fix for IE --- apps/common/main/lib/util/themeinit.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/common/main/lib/util/themeinit.js b/apps/common/main/lib/util/themeinit.js index 078565a972..d3614a509e 100644 --- a/apps/common/main/lib/util/themeinit.js +++ b/apps/common/main/lib/util/themeinit.js @@ -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); }