fix(Utils): Properly parse timestamps with thousands separators (#363)

This commit is contained in:
absidue
2023-03-22 07:48:01 +01:00
committed by GitHub
parent 62a68b207c
commit 1c72a41675

View File

@@ -116,7 +116,7 @@ export function generateRandomString(length: number): string {
* @returns seconds
*/
export function timeToSeconds(time: string): number {
const params = time.split(':').map((param) => parseInt(param));
const params = time.split(':').map((param) => parseInt(param.replace(/\D/g, '')));
switch (params.length) {
case 1:
return params[0];