Fix naming of variable

master
Marco Heiming 2022-01-04 12:03:23 +01:00
parent fdc519c3df
commit 144f4d3196
2 changed files with 3 additions and 6 deletions

View File

@ -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];

View File

@ -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);
};