aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--utils/numberUtils.js7
1 files changed, 3 insertions, 4 deletions
diff --git a/utils/numberUtils.js b/utils/numberUtils.js
index 442015d..3b1dc70 100644
--- a/utils/numberUtils.js
+++ b/utils/numberUtils.js
@@ -87,10 +87,9 @@ let utils = {
timeNumber: (time, secondDecimals = 0) => {
let mins = Math.floor(time / 1000 / 60)
let secs = (time / 1000) % 60
- let text = ""
- if (mins === 0) text = `${secs.toFixed(secondDecimals)}s`
- else text = `${mins}m ${secs.toFixed(secondDecimals)}s`
- return text
+
+ if (mins === 0) return `${secs.toFixed(secondDecimals)}s`
+ else return `${mins}m ${secs.toFixed(secondDecimals)}s`
},
timeNumber2: (time) => {
let hours = Math.floor(time / 1000 / 60 / 60)