From 620f97f483667c0bba0c6632843e064343917595 Mon Sep 17 00:00:00 2001 From: deicidus <> Date: Sun, 31 Jul 2022 23:30:15 -0700 Subject: [PATCH] fixed broken function --- util.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/util.js b/util.js index 0b613af..0ee71a3 100644 --- a/util.js +++ b/util.js @@ -20,10 +20,10 @@ export const noop = () => {} export const delay = (n = 550) => new Promise(resolve => setTimeout(resolve, n)) -export const isObject = obj => Object.prototype.toString.call(obj) === '[object Object]' +export const isObject = obj => { return Object.prototype.toString.call(obj) === '[object Object]' } -export const convertToDuration = (milliseconds: number) => { - const stringifyTime = (time: number): string => String(time).padStart(2, '0') +export const convertToDuration = (milliseconds) => { + const stringifyTime = (time) => String(time).padStart(2, '0') const seconds = Math.floor(milliseconds / 1000) const minutes = Math.floor(seconds / 60) const hours = Math.floor(minutes / 60) @@ -32,7 +32,7 @@ export const convertToDuration = (milliseconds: number) => { )}:${stringifyTime(seconds % 60)}` } -export const convertToTimeWorked = (milliseconds: number) => { +export const convertToTimeWorked = (milliseconds) => { const seconds = Math.floor(milliseconds / 1000) const minutes = Math.floor(seconds / 60) const hours = Math.floor(minutes / 60)