Skip to content

Commit

Permalink
Fix convertTimeSpanToMs (#661)
Browse files Browse the repository at this point in the history
  • Loading branch information
harshithmohan authored Oct 25, 2023
1 parent 44a74fe commit ad51692
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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));
};

/**
Expand Down

0 comments on commit ad51692

Please sign in to comment.