diff --git a/server/scripts/modules/extendedforecast.mjs b/server/scripts/modules/extendedforecast.mjs index c7fe98a..33537e4 100644 --- a/server/scripts/modules/extendedforecast.mjs +++ b/server/scripts/modules/extendedforecast.mjs @@ -137,10 +137,6 @@ const parse = (fullForecast, forecastUrl) => { } // get the object to modify/populate const fDay = forecast[destIndex]; - // high temperature will always be last in the source array so it will overwrite the low values assigned below - fDay.icon = getLargeIcon(period.icon); - fDay.text = shortenExtendedForecastText(period.shortForecast); - fDay.dayName = dates[destIndex]; // preload the icon preloadImg(fDay.icon); @@ -148,6 +144,9 @@ const parse = (fullForecast, forecastUrl) => { if (period.isDaytime) { // day time is the high temperature fDay.high = period.temperature; + fDay.icon = getLargeIcon(period.icon); + fDay.text = shortenExtendedForecastText(period.shortForecast); + fDay.dayName = dates[destIndex]; // Wait for the corresponding night period to increment } else { // low temperature