mirror of
https://github.com/netbymatt/ws4kp.git
synced 2026-04-18 09:39:30 -07:00
better error handling for api.weather.gov
This commit is contained in:
@@ -50,6 +50,12 @@ class LatestObservations extends WeatherDisplay {
|
||||
// cut down to the maximum of 7
|
||||
this.data = actualConditions.slice(0,this.MaximumRegionalStations);
|
||||
|
||||
// test for at least one station
|
||||
if (this.data.length < 1) {
|
||||
this.setStatus(STATUS.noData);
|
||||
return;
|
||||
}
|
||||
|
||||
this.drawCanvas();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user