Catch error for null value of NightLightActive

This commit is contained in:
Romain Vigier
2019-10-30 10:32:13 +01:00
parent d53d6f37b4
commit 358f970ec6
+6 -1
View File
@@ -74,7 +74,12 @@ function _build_theme_variants() {
}
function _apply_theme_variant() {
nightlight_active = proxy.get_cached_property('NightLightActive').get_boolean() || false;
try {
nightlight_active = proxy.get_cached_property('NightLightActive').get_boolean();
}
catch(e) {
nightlight_active = false;
}
_set_theme(nightlight_active ? user_theme_night : user_theme_day);
}