filter current conditions for missing icon or current conditions

This commit is contained in:
Matt Walsh
2023-01-05 14:19:33 -06:00
parent 784c074e32
commit 0743b9e2bb
2 changed files with 4 additions and 1 deletions

View File

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