aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/utils.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/utils.js')
-rw-r--r--src/lib/utils.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/utils.js b/src/lib/utils.js
index 5303ec35..755d8daf 100644
--- a/src/lib/utils.js
+++ b/src/lib/utils.js
@@ -282,7 +282,7 @@ export function shuffleArray(array) {
}
}
- export let closest = (a, n) =>
+export let closest = (a, n) =>
a.reduce((prev, curr) =>
Math.abs(curr - n) < Math.abs(prev - n) ? curr : prev
);