better latest observation get data routine

This commit is contained in:
Matt Walsh
2022-12-22 14:46:58 -06:00
parent 25291efff5
commit 03dfbc462b
3 changed files with 43 additions and 21 deletions

View File

@@ -87,6 +87,9 @@ class RegionalForecast extends WeatherDisplay {
// wait for the regional observation if it's not done yet
const observation = await observationPromise;
if (!observation) return false;
// format the observation the same as the forecast
const regionalObservation = {
daytime: !!observation.icon.match(/\/day\//),