Integrate no-data icon close #94 #128

This commit is contained in:
Matt Walsh
2025-08-10 20:05:07 -05:00
parent ea58b5a9c8
commit c8a25e5d9a
9 changed files with 21 additions and 8 deletions

View File

@@ -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' : ''}`);
}
}
};