mirror of
https://github.com/netbymatt/ws4kp.git
synced 2026-04-17 09:09:30 -07:00
@@ -13,7 +13,7 @@ const largeIcon = (link, _isNightTime) => {
|
||||
} catch (error) {
|
||||
console.warn(`largeIcon: ${error.message}`);
|
||||
// Return a fallback icon to prevent downstream errors
|
||||
return addPath(_isNightTime ? 'Clear.gif' : 'Sunny.gif');
|
||||
return addPath(`No-Data.gif?${conditionIcon}${isNightTime ? '-n' : ''}`);
|
||||
}
|
||||
|
||||
// find the icon
|
||||
@@ -169,7 +169,7 @@ const largeIcon = (link, _isNightTime) => {
|
||||
default: {
|
||||
console.warn(`Unknown weather condition '${conditionIcon}' from ${link}; using fallback icon`);
|
||||
// Return a reasonable fallback instead of false to prevent downstream errors
|
||||
return addPath(isNightTime ? 'Clear.gif' : 'Sunny.gif');
|
||||
return addPath(`No-Data.gif?${conditionIcon}${isNightTime ? '-n' : ''}`);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user