Fix for NaN message when coffee is brewing
This commit is contained in:
@@ -71,6 +71,8 @@ function setData(cups, temp, opa, timeFromUpdate, timeFromBrew, brewing){
|
||||
$("#scale2").css({width: Math.min(cups/9*100,100) + '%'});
|
||||
$("#text,body").removeClass();
|
||||
|
||||
cups = Number(cups).toFixed(1);
|
||||
|
||||
if(timeFromUpdate > 600000){
|
||||
cups = "?";
|
||||
brewtext = "∞";
|
||||
@@ -88,7 +90,6 @@ function setData(cups, temp, opa, timeFromUpdate, timeFromBrew, brewing){
|
||||
if($("#text").html() == "+" && !brewing)
|
||||
$("body").addClass("coffeeready");
|
||||
|
||||
cups = Number(cups).toFixed(1);
|
||||
var cupsString = cups.toString();
|
||||
len = cupsString.length;
|
||||
$("#text").html(cups);
|
||||
|
||||
Reference in New Issue
Block a user