Average should never be negative

This commit is contained in:
Firepup Sixfifty 2024-11-09 00:04:19 +00:00
parent dc1c42f248
commit a935fb02e2
Signed by: firepup650
SSH key fingerprint: SHA256:U0Zp8EhEe3CMqFSrC79CqatzaEiL4sjta80/RSX2XrY

View file

@ -150,7 +150,7 @@ async function report() {
"increase": diff,
"start": oldest,
})
let averageSpeed = await getAverage();
let averageSpeed = Math.max(0, await getAverage());
let pastThousandsGoal = Math.floor(latest / 1000) * 1000;
let goals = predictSpeed(goalDate, goalNumber, latest);
let message =