mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-06-30 13:09:34 +00:00
Fix regression causing 'undefined' to show up when config.hideTemp is false
This commit is contained in:
parent
50b4d05ef5
commit
6ba5056c96
@ -195,11 +195,6 @@ Module.register("currentweather",{
|
|||||||
var large = document.createElement("div");
|
var large = document.createElement("div");
|
||||||
large.className = "large light";
|
large.className = "large light";
|
||||||
|
|
||||||
if (this.config.hideTemp === true) {
|
|
||||||
var weatherIcon = document.createElement("span");
|
|
||||||
weatherIcon.className = "wi weathericon " + this.weatherType;
|
|
||||||
large.appendChild(weatherIcon);
|
|
||||||
|
|
||||||
var degreeLabel = "";
|
var degreeLabel = "";
|
||||||
if (this.config.units === "metric" || this.config.units === "imperial") {
|
if (this.config.units === "metric" || this.config.units === "imperial") {
|
||||||
degreeLabel += "°";
|
degreeLabel += "°";
|
||||||
@ -222,6 +217,11 @@ Module.register("currentweather",{
|
|||||||
this.config.decimalSymbol = ".";
|
this.config.decimalSymbol = ".";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (this.config.hideTemp === true) {
|
||||||
|
var weatherIcon = document.createElement("span");
|
||||||
|
weatherIcon.className = "wi weathericon " + this.weatherType;
|
||||||
|
large.appendChild(weatherIcon);
|
||||||
|
|
||||||
var temperature = document.createElement("span");
|
var temperature = document.createElement("span");
|
||||||
temperature.className = "bright";
|
temperature.className = "bright";
|
||||||
temperature.innerHTML = " " + this.temperature.replace(".", this.config.decimalSymbol) + degreeLabel;
|
temperature.innerHTML = " " + this.temperature.replace(".", this.config.decimalSymbol) + degreeLabel;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user