From 353799f41e23990db77c0d828d700330c5db2e3b Mon Sep 17 00:00:00 2001 From: Jordan Eldredge Date: Sat, 18 Nov 2017 16:48:23 -0800 Subject: [PATCH] Make sorting pure --- js/utils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/utils.js b/js/utils.js index e73949c7..4a26924c 100644 --- a/js/utils.js +++ b/js/utils.js @@ -136,7 +136,7 @@ export const shuffle = array => { }; export const sort = (array, iteratee) => - array.sort((a, b) => { + [...array].sort((a, b) => { const aKey = iteratee(a); const bKey = iteratee(b); if (aKey < bKey) {