From 80aa6ffe435b170466838f977d52438a95e22186 Mon Sep 17 00:00:00 2001 From: Sam Potts Date: Tue, 30 Apr 2019 23:44:05 +1000 Subject: Linting changes --- src/js/utils/time.js | 1 - 1 file changed, 1 deletion(-) (limited to 'src/js/utils/time.js') diff --git a/src/js/utils/time.js b/src/js/utils/time.js index 2deccf65..ffca88b2 100644 --- a/src/js/utils/time.js +++ b/src/js/utils/time.js @@ -18,7 +18,6 @@ export function formatTime(time = 0, displayHours = false, inverted = false) { // Format time component to add leading zero const format = value => `0${value}`.slice(-2); - // Breakdown to hours, mins, secs let hours = getHours(time); const mins = getMinutes(time); -- cgit v1.2.3 From c3f10e7df3e77c3cf8ad3165ad881bcd11a9b7e3 Mon Sep 17 00:00:00 2001 From: Binyamin Laukstein <7raivis@inbox.lv> Date: Wed, 22 Jan 2020 08:53:08 +0200 Subject: Uncaught RangeError: Maximum call stack size exceeded Fix formatTime infinite loop #1621 --- src/js/utils/time.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/js/utils/time.js') diff --git a/src/js/utils/time.js b/src/js/utils/time.js index ffca88b2..17228de5 100644 --- a/src/js/utils/time.js +++ b/src/js/utils/time.js @@ -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 -- cgit v1.2.3