From f01a1ae4ec34005f69dfb2bbb382099f9006d42f Mon Sep 17 00:00:00 2001 From: Ajay Ramachandran Date: Fri, 13 Aug 2021 23:19:08 -0400 Subject: Never show negative formatted time --- src/utils.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/utils.ts b/src/utils.ts index 0ea27238..c809e379 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -429,6 +429,8 @@ export default class Utils { } getFormattedTime(seconds: number, precise?: boolean): string { + seconds = Math.max(seconds, 0); + const hours = Math.floor(seconds / 60 / 60); const minutes = Math.floor(seconds / 60) % 60; let minutesDisplay = String(minutes); -- cgit v1.2.3