From 3d7b5c8a2a5249f87db31e03b4653070c0708207 Mon Sep 17 00:00:00 2001 From: Devine Lu Linvega Date: Fri, 14 Sep 2018 15:09:45 +1200 Subject: [PATCH] Added backward compat --- desktop/sources/scripts/lib/theme.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/desktop/sources/scripts/lib/theme.js b/desktop/sources/scripts/lib/theme.js index 5e4a75a..c094aaa 100644 --- a/desktop/sources/scripts/lib/theme.js +++ b/desktop/sources/scripts/lib/theme.js @@ -69,7 +69,8 @@ function Theme(default_theme = {background: "#222", f_high: "#fff", f_med: "#777 { let theme; - if(any && any.data){ return any; } + if(any && any.background){ return any; } + else if(any && any.data){ return any.data; } else if(any && is_json(any)){ return JSON.parse(any); } else if(any && is_html(any)){ return this.extract(any); } @@ -117,7 +118,7 @@ function Theme(default_theme = {background: "#222", f_high: "#fff", f_med: "#777 this.invert = function() { - this.load(this.active.background == this.collection.noir.data.background ? this.collection.pale : this.collection.noir) + this.load(this.active.background == this.collection.noir.background ? this.collection.pale : this.collection.noir) } // Drag