mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-12-12 09:52:37 +00:00
[weather] better null value handling for weather type (#3892)
As mentioned [here](https://github.com/MagicMirrorOrg/MagicMirror/pull/3878#issuecomment-3275344406) our weather module needs a bit better handling for null values in the type field. This pr adds this and cleans up the layout a little.
This commit is contained in:
@@ -168,7 +168,7 @@ Module.register("weather", {
|
||||
this.scheduleUpdate();
|
||||
|
||||
if (this.weatherProvider.currentWeather()) {
|
||||
this.sendNotification("CURRENTWEATHER_TYPE", { type: this.weatherProvider.currentWeather().weatherType.replace("-", "_") });
|
||||
this.sendNotification("CURRENTWEATHER_TYPE", { type: this.weatherProvider.currentWeather().weatherType?.replace("-", "_") });
|
||||
}
|
||||
|
||||
const notificationPayload = {
|
||||
|
||||
Reference in New Issue
Block a user