Average should never be negative
This commit is contained in:
parent
dc1c42f248
commit
a935fb02e2
1 changed files with 1 additions and 1 deletions
|
@ -150,7 +150,7 @@ async function report() {
|
||||||
"increase": diff,
|
"increase": diff,
|
||||||
"start": oldest,
|
"start": oldest,
|
||||||
})
|
})
|
||||||
let averageSpeed = await getAverage();
|
let averageSpeed = Math.max(0, await getAverage());
|
||||||
let pastThousandsGoal = Math.floor(latest / 1000) * 1000;
|
let pastThousandsGoal = Math.floor(latest / 1000) * 1000;
|
||||||
let goals = predictSpeed(goalDate, goalNumber, latest);
|
let goals = predictSpeed(goalDate, goalNumber, latest);
|
||||||
let message =
|
let message =
|
||||||
|
|
Loading…
Reference in a new issue