thrimbletrimmer: Fix missing int parsing in duration parser

yay javascript
pull/235/head
Mike Lang 3 years ago
parent 783c571cb2
commit 2467a64ec3

@ -108,7 +108,7 @@ function parseDuration(duration) {
direction = -1; direction = -1;
} }
const [hours, mins, secs] = duration.split(":"); 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) { function toBustime(date) {

Loading…
Cancel
Save