Fix naming of variable
parent
fdc519c3df
commit
144f4d3196
|
|
@ -47,7 +47,7 @@ function formatDuration(millis) {
|
|||
|
||||
function draw() {
|
||||
layout.icon.txt = current.txt;
|
||||
layout.icon.cond = current.code;
|
||||
layout.icon.code = current.code;
|
||||
const temp = locale.temp(current.temp-273.15).match(/^(\D*\d*)(.*)$/);
|
||||
layout.temp.label = temp[1];
|
||||
layout.tempUnit.label = temp[2];
|
||||
|
|
|
|||
|
|
@ -312,14 +312,11 @@ exports.drawIcon = function(cond, x, y, r) {
|
|||
}
|
||||
}
|
||||
|
||||
const code = cond.code || -1;
|
||||
if (code > 0) {
|
||||
chooseIconByCode(code.code)(x, y, r);
|
||||
if (cond.code > 0) {
|
||||
chooseIconByCode(cond.code)(x, y, r);
|
||||
} else {
|
||||
chooseIcon(cond.txt)(x, y, r);
|
||||
}
|
||||
|
||||
console.log(cond);
|
||||
|
||||
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in New Issue