aboutsummaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
Diffstat (limited to 'editor')
-rw-r--r--editor/scripts/lib/theme.js18
1 files changed, 9 insertions, 9 deletions
diff --git a/editor/scripts/lib/theme.js b/editor/scripts/lib/theme.js
index 85fcc63..e218392 100644
--- a/editor/scripts/lib/theme.js
+++ b/editor/scripts/lib/theme.js
@@ -144,15 +144,15 @@ function Theme (client) {
function isValid (json) {
if (!json) { return false }
- if (!json.background) { return false }
- if (!json.f_high) { return false }
- if (!json.f_med) { return false }
- if (!json.f_low) { return false }
- if (!json.f_inv) { return false }
- if (!json.b_high) { return false }
- if (!json.b_med) { return false }
- if (!json.b_low) { return false }
- if (!json.b_inv) { return false }
+ if (!json.background || !isColor(json.background)) { return false }
+ if (!json.f_high || !isColor(json.f_high)) { return false }
+ if (!json.f_med || !isColor(json.f_med)) { return false }
+ if (!json.f_low || !isColor(json.f_low)) { return false }
+ if (!json.f_inv || !isColor(json.f_inv)) { return false }
+ if (!json.b_high || !isColor(json.b_high)) { return false }
+ if (!json.b_med || !isColor(json.b_med)) { return false }
+ if (!json.b_low || !isColor(json.b_low)) { return false }
+ if (!json.b_inv || !isColor(json.b_inv)) { return false }
return true
}