better filtering of null station data for current weather close #54

5.13.3
This commit is contained in:
Matt Walsh
2024-10-19 13:26:45 -05:00
parent c9307768a4
commit 13b77a0070
6 changed files with 19 additions and 17 deletions

View File

@@ -56,7 +56,9 @@ class CurrentWeather extends WeatherDisplay {
|| observations.features[0].properties.windSpeed.value === null
|| observations.features[0].properties.textDescription === null
|| observations.features[0].properties.textDescription === ''
|| observations.features[0].properties.icon === null) {
|| observations.features[0].properties.icon === null
|| observations.features[0].properties.dewpoint.value === null
|| observations.features[0].properties.barometricPressure.value === null) {
observations = undefined;
throw new Error(`Unable to get observations: ${station.properties.stationIdentifier}, trying next station`);
}