Fixing padStart IE11 incompatibility

This commit is contained in:
Jonathan Putney
2020-01-09 10:10:53 -05:00
parent 5713a26b9b
commit 1ecc14442b

View File

@@ -40,9 +40,8 @@ export function getSecondsAsHHMMSS(totalSeconds: Number) {
msStr = '.' + msStr.split('.')[1];
}
return hours.toString().padStart(2, '0') + ':' +
minutes.toString().padStart(2, '0') + ':' +
seconds.toString().padStart(2, '0') + msStr;
return (hours + ':' + minutes + ':' + seconds).replace(/\b\d\b/g,
'0$&') + msStr;
}
/**