Don't try to set variant if the current time is unavailable
This commit is contained in:
@@ -144,7 +144,7 @@ var GtkThemer = class {
|
||||
_onManualGtkVariantsChanged(_settings, enabled) {
|
||||
this.disable();
|
||||
this.enable();
|
||||
if (enabled && e.timer.time)
|
||||
if (enabled)
|
||||
this._setVariant(e.timer.time);
|
||||
}
|
||||
|
||||
@@ -158,6 +158,8 @@ var GtkThemer = class {
|
||||
}
|
||||
|
||||
_setVariant(time) {
|
||||
if (!time)
|
||||
return;
|
||||
logDebug(`Setting the GTK ${time} variant...`);
|
||||
switch (time) {
|
||||
case 'day':
|
||||
|
||||
@@ -144,7 +144,7 @@ var ShellThemer = class {
|
||||
_onManualShellVariantsChanged(_settings, enabled) {
|
||||
this.disable();
|
||||
this.enable();
|
||||
if (enabled && e.timer.time)
|
||||
if (enabled)
|
||||
this._setVariant(e.timer.time);
|
||||
}
|
||||
|
||||
@@ -158,6 +158,8 @@ var ShellThemer = class {
|
||||
}
|
||||
|
||||
_setVariant(time) {
|
||||
if (!time)
|
||||
return;
|
||||
logDebug(`Setting the shell ${time} variant...`);
|
||||
let shellTheme;
|
||||
switch (time) {
|
||||
|
||||
@@ -75,7 +75,7 @@ var Timer = class {
|
||||
|
||||
|
||||
get time() {
|
||||
return this._source.time;
|
||||
return this._source ? this._source.time : null;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user