Compare commits

...

2 Commits

Author SHA1 Message Date
Matt Walsh
bef42a3da2 6.1.4 2025-08-11 22:35:18 -05:00
Matt Walsh
13ff0317e6 fix nighttime icons on extended forecast close #134 2025-08-11 22:35:03 -05:00
3 changed files with 6 additions and 7 deletions

4
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{
"name": "ws4kp",
"version": "6.1.3",
"version": "6.1.4",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "ws4kp",
"version": "6.1.3",
"version": "6.1.4",
"license": "MIT",
"dependencies": {
"dotenv": "^17.0.1",

View File

@@ -1,6 +1,6 @@
{
"name": "ws4kp",
"version": "6.1.3",
"version": "6.1.4",
"description": "Welcome to the WeatherStar 4000+ project page!",
"main": "index.mjs",
"type": "module",

View File

@@ -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