Make sorting pure

This commit is contained in:
Jordan Eldredge 2017-11-18 16:48:23 -08:00
parent a233a98c9e
commit 353799f41e

View file

@ -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) {