mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-07-01 13:33:15 +00:00
Possible fix for #181
This commit is contained in:
parent
47a18666b6
commit
44a6604fe8
@ -203,10 +203,14 @@ Module.register("currentweather",{
|
|||||||
var sunset = moment(data.sys.sunset * 1000).format("x");
|
var sunset = moment(data.sys.sunset * 1000).format("x");
|
||||||
|
|
||||||
if (sunrise < now && sunset > now) {
|
if (sunrise < now && sunset > now) {
|
||||||
this.sunriseSunsetTime = moment(data.sys.sunset * 1000).format((this.config.timeFormat === 24) ? "HH:mm" : "hh:mm a");
|
if (sunrise.isValid()) {
|
||||||
|
this.sunriseSunsetTime = moment(data.sys.sunset * 1000).format((this.config.timeFormat === 24) ? "HH:mm" : "hh:mm a");
|
||||||
|
}
|
||||||
this.sunriseSunsetIcon = "wi-sunset";
|
this.sunriseSunsetIcon = "wi-sunset";
|
||||||
} else {
|
} else {
|
||||||
this.sunriseSunsetTime = moment(data.sys.sunrise * 1000).format((this.config.timeFormat === 24) ? "HH:mm" : "hh:mm a");
|
if (sunset.isValid()) {
|
||||||
|
this.sunriseSunsetTime = moment(data.sys.sunrise * 1000).format((this.config.timeFormat === 24) ? "HH:mm" : "hh:mm a");
|
||||||
|
}
|
||||||
this.sunriseSunsetIcon = "wi-sunrise";
|
this.sunriseSunsetIcon = "wi-sunrise";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user