From 2f0c1f745c927b98c32f0a27e239edc5a528bbde Mon Sep 17 00:00:00 2001 From: myadzel Date: Sat, 3 Dec 2022 22:24:47 +0300 Subject: [PATCH] fix lint errors (issue #1094) --- src/lib/utils/index.js | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/lib/utils/index.js b/src/lib/utils/index.js index 744e253da..8083d02bd 100644 --- a/src/lib/utils/index.js +++ b/src/lib/utils/index.js @@ -1,17 +1,15 @@ -const formatTrackLength = (length, nullable) => { +function formatTrackLength(len, nullable) { let digits = 0; - if (length < 10000) { + if (len < 10000) { digits = 2; - } else if (length < 100000) { + } else if (len < 100000) { digits = 1; } - const fixed = (length / 1000).toFixed(digits); + const fixed = (len / 1000).toFixed(digits); return (nullable ? fixed : Number(fixed)) + ' km'; -}; +} -export { - formatTrackLength, -}; +export {formatTrackLength};