diff options
-rw-r--r-- | src/data/composite/data/withSortedList.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/data/composite/data/withSortedList.js b/src/data/composite/data/withSortedList.js index 3a069cf7..1d9188f8 100644 --- a/src/data/composite/data/withSortedList.js +++ b/src/data/composite/data/withSortedList.js @@ -122,10 +122,10 @@ export default templateCompositeFrom({ }, [0]); const unstableSortIndices = - Array.from( - {length: list.length}, - (_, index) => - stableToUnstable[symbols.indexOf(indexToSymbol.get(index))]); + Array.from({length: list.length}, (_, index) => index) + .map(index => indexToSymbol.get(index)) + .map(symbol => symbols.indexOf(symbol)) + .map(stable => stableToUnstable[stable]); return continuation({ ['#sortedList']: sortedList, |