Don't set to failed if not enabled
- Allow any falsey value to indicate failure
This commit is contained in:
parent
bec80a1ebe
commit
137c2f6d08
1 changed files with 2 additions and 2 deletions
|
|
@ -31,8 +31,8 @@ class HourlyGraph extends WeatherDisplay {
|
||||||
if (!super.getData(undefined, refresh)) return;
|
if (!super.getData(undefined, refresh)) return;
|
||||||
|
|
||||||
const data = await getHourlyData(() => this.stillWaiting());
|
const data = await getHourlyData(() => this.stillWaiting());
|
||||||
if (data === undefined) {
|
if (!data) {
|
||||||
this.setStatus(STATUS.failed);
|
if (this.isEnabled) this.setStatus(STATUS.failed);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue