mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-06-27 11:50:00 +00:00
Change Two Conditionals to UpperCase-If
This commit is contained in:
parent
cb2cc0cb9e
commit
5568e0c2ad
@ -142,10 +142,10 @@ Module.register("weatherforecast",{
|
||||
|
||||
var maxTempCell = document.createElement("td");
|
||||
maxTempCell.innerHTML = forecast.maxTemp;
|
||||
if(this.config.scale == "C" || this.config.scale == "c") {
|
||||
if(this.config.scale.toUpperCase() == "C") {
|
||||
maxTempCell.innerHTML += " °C";
|
||||
} else {
|
||||
if(this.config.scale == "F" || this.config.scale == "f") {
|
||||
if(this.config.scale.toUpperCase() == "F") {
|
||||
maxTempCell.innerHTML += " °F";
|
||||
}
|
||||
}
|
||||
@ -154,10 +154,10 @@ Module.register("weatherforecast",{
|
||||
|
||||
var minTempCell = document.createElement("td");
|
||||
minTempCell.innerHTML = forecast.minTemp;
|
||||
if(this.config.scale == "C" || this.config.scale == "c") {
|
||||
if(this.config.scale.toUpperCase() == "C") {
|
||||
minTempCell.innerHTML += " °C";
|
||||
} else {
|
||||
if(this.config.scale == "F" || this.config.scale == "f") {
|
||||
if(this.config.scale.toUpperCase() == "F") {
|
||||
minTempCell.innerHTML += " °F";
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user