diff --git a/apps/common/main/lib/util/htmlutils.js b/apps/common/main/lib/util/htmlutils.js
index dfc103547..4c4a58761 100644
--- a/apps/common/main/lib/util/htmlutils.js
+++ b/apps/common/main/lib/util/htmlutils.js
@@ -52,14 +52,18 @@ var checkLocalStorage = (function () {
}
})();
-if ( window.desktop && window.desktop.theme ) {
- if ( window.desktop.theme.id ) {
- // params.uitheme = undefined;
- localStorage.setItem("ui-theme-id", window.desktop.theme.id);
- } else
- if ( window.desktop.theme.type ) {
- if ( window.desktop.theme.type == 'dark' ) params.uitheme == 'default-dark'; else
- if ( window.desktop.theme.type == 'light' ) params.uitheme == 'default-light';
+if ( window.desktop && !!window.RendererProcessVariable ) {
+ var theme = window.RendererProcessVariable.theme
+
+ if ( theme ) {
+ if ( theme.id ) {
+ // params.uitheme = undefined;
+ localStorage.setItem("ui-theme-id", theme.id);
+ } else
+ if ( !!theme.type ) {
+ if ( theme.type == 'dark' ) params.uitheme = 'default-dark'; else
+ if ( theme.type == 'light' ) params.uitheme = 'default-light';
+ }
}
}