mirror of
https://github.com/netbymatt/ws4kp.git
synced 2026-04-17 17:19:30 -07:00
better error handlig of shared data
This commit is contained in:
@@ -28,6 +28,10 @@ class HourlyGraph extends WeatherDisplay {
|
||||
if (!super.getData()) return;
|
||||
|
||||
const data = await getHourlyData();
|
||||
if (data === undefined) {
|
||||
this.setStatus(STATUS.failed);
|
||||
return;
|
||||
}
|
||||
|
||||
// get interesting data
|
||||
const temperature = data.map((d) => d.temperature);
|
||||
|
||||
Reference in New Issue
Block a user