fix nighttime icons on extended forecast close #134
This commit is contained in:
parent
5cc85840a9
commit
13ff0317e6
1 changed files with 3 additions and 4 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue