mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-08-21 04:45:17 +00:00
Fix regression causing 'undefined' to show up when config.hideTemp is false
This commit is contained in:
@@ -195,11 +195,6 @@ Module.register("currentweather",{
|
||||
var large = document.createElement("div");
|
||||
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 = "";
|
||||
if (this.config.units === "metric" || this.config.units === "imperial") {
|
||||
degreeLabel += "°";
|
||||
@@ -222,6 +217,11 @@ Module.register("currentweather",{
|
||||
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");
|
||||
temperature.className = "bright";
|
||||
temperature.innerHTML = " " + this.temperature.replace(".", this.config.decimalSymbol) + degreeLabel;
|
||||
|
Reference in New Issue
Block a user