filter current conditions for missing icon or current conditions
This commit is contained in:
parent
784c074e32
commit
0743b9e2bb
|
@ -53,7 +53,9 @@ class CurrentWeather extends WeatherDisplay {
|
||||||
// test data quality
|
// test data quality
|
||||||
if (observations.features[0].properties.temperature.value === null
|
if (observations.features[0].properties.temperature.value === null
|
||||||
|| observations.features[0].properties.windSpeed.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;
|
observations = undefined;
|
||||||
throw new Error(`Unable to get observations: ${station.properties.stationIdentifier}, trying next station`);
|
throw new Error(`Unable to get observations: ${station.properties.stationIdentifier}, trying next station`);
|
||||||
}
|
}
|
||||||
|
|
|
@ -87,6 +87,7 @@ const getWeatherRegionalIconFromIconLink = (link, _isNightTime) => {
|
||||||
return addPath('Light-Snow.gif');
|
return addPath('Light-Snow.gif');
|
||||||
|
|
||||||
case 'rain_snow':
|
case 'rain_snow':
|
||||||
|
case 'rain_snow-n':
|
||||||
return addPath('Rain-Snow-1992.gif');
|
return addPath('Rain-Snow-1992.gif');
|
||||||
|
|
||||||
case 'snow_fzra':
|
case 'snow_fzra':
|
||||||
|
|
Loading…
Reference in a new issue