mirror of
https://github.com/captbaritone/webamp.git
synced 2026-07-21 09:09:01 +00:00
Make sorting pure
This commit is contained in:
parent
a233a98c9e
commit
353799f41e
1 changed files with 1 additions and 1 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue