From b36fb7d20e8dbd3e0a109756ff1c5c6d7455b268 Mon Sep 17 00:00:00 2001 From: Romain Vigier Date: Fri, 15 May 2020 09:34:53 +0200 Subject: [PATCH] Workaround error after suspend --- src/modules/Switcher.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/modules/Switcher.js b/src/modules/Switcher.js index f71e6dd..f23ba45 100644 --- a/src/modules/Switcher.js +++ b/src/modules/Switcher.js @@ -86,6 +86,10 @@ var Switcher = class { } _on_theme_changed() { + if ( !this.theme || !this.time ) { + return; + } + try { this.theme.update_variants(); this.theme.set_variant(this.time.current); @@ -96,6 +100,10 @@ var Switcher = class { } _on_time_changed() { + if ( !this.theme || !this.time ) { + return; + } + try { this.theme.set_variant(this.time.current); }