diff --git a/api/js/framework/fw_base.js b/api/js/framework/fw_base.js index b6f1887dc0..038417cd06 100644 --- a/api/js/framework/fw_base.js +++ b/api/js/framework/fw_base.js @@ -1331,13 +1331,13 @@ var fw_base = (function(){ "use strict"; return Class.extend( */ _setDarkMode: function(_state) { - let state = _state == '0' ?'0':'1'; + let state = !_state || _state == '0' ?'0':'1'; jQuery('html').attr('data-darkmode', state); jQuery('iframe').each((i, frame) =>{ try { if (frame && frame.contentWindow && frame.contentWindow.jQuery) { - frame.contentWindow.jQuery('html').attr('data-darkmode', _state == 0?'':'1'); + frame.contentWindow.jQuery('html').attr('data-darkmode', state == 0?'':'1'); } }catch(e) {