Merge pull request #1655 from laukstein/patch-1

Uncaught RangeError: Maximum call stack size exceeded
This commit is contained in:
Sam Potts
2020-01-22 11:30:19 +00:00
committed by GitHub
2 changed files with 2 additions and 1 deletions

View File

@ -13,7 +13,7 @@ export const getSeconds = value => Math.trunc(value % 60, 10);
export function formatTime(time = 0, displayHours = false, inverted = false) {
// Bail if the value isn't a number
if (!is.number(time)) {
return formatTime(null, displayHours, inverted);
return formatTime(undefined, displayHours, inverted);
}
// Format time component to add leading zero