From ad51692622a73ca5c29f55cdd6914cb779b0b3fb Mon Sep 17 00:00:00 2001 From: Harshith Mohan Date: Wed, 25 Oct 2023 20:34:31 +0530 Subject: [PATCH] Fix convertTimeSpanToMs (#661) --- src/core/util.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/util.ts b/src/core/util.ts index 38c867adf..d595ded0b 100644 --- a/src/core/util.ts +++ b/src/core/util.ts @@ -100,7 +100,7 @@ export const convertTimeSpanToMs = (timeSpan: string) => { const [duration, durationMs] = timeSpan.split('.'); const [hours, minutes, seconds] = duration.split(':'); return (((toNumber(hours) * 3600) + (toNumber(minutes) * 60) + toNumber(seconds)) * 1000) - + toNumber(durationMs.slice(0, 3)); + + toNumber((durationMs ?? '0').slice(0, 3)); }; /**