Uncaught RangeError: Maximum call stack size exceeded
Fix formatTime infinite loop #1621
This commit is contained in:
parent
b2ac730572
commit
c3f10e7df3
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user