From 2467a64ec30c300f36edb2fd45831cc0f2056a69 Mon Sep 17 00:00:00 2001 From: Mike Lang Date: Sun, 17 Oct 2021 22:23:38 +1100 Subject: [PATCH] thrimbletrimmer: Fix missing int parsing in duration parser yay javascript --- thrimbletrimmer/scripts/IO.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/thrimbletrimmer/scripts/IO.js b/thrimbletrimmer/scripts/IO.js index 54ece59..faf3728 100644 --- a/thrimbletrimmer/scripts/IO.js +++ b/thrimbletrimmer/scripts/IO.js @@ -108,7 +108,7 @@ function parseDuration(duration) { direction = -1; } const [hours, mins, secs] = duration.split(":"); - return (3600 * parseInt(hours) + 60 * (mins || "0") + (secs || "0")) * direction; + return (3600 * parseInt(hours) + 60 * (parseInt(mins) || 0) + (parseFloat(secs) || 0)) * direction; } function toBustime(date) {