diff options
Diffstat (limited to 'src/data')
-rw-r--r-- | src/data/composite/data/withSortedList.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/data/composite/data/withSortedList.js b/src/data/composite/data/withSortedList.js index c86d1989..a7942ab4 100644 --- a/src/data/composite/data/withSortedList.js +++ b/src/data/composite/data/withSortedList.js @@ -92,7 +92,7 @@ export default templateCompositeFrom({ const sortedList = sortIndices.map(index => list[index]); - const unstableSortIndices = + const stableToUnstable = symbols .map((current, index) => { if (index === 0) { @@ -117,6 +117,9 @@ export default templateCompositeFrom({ return accumulator; }, [0]); + const unstableSortIndices = + sortIndices.map(stable => stableToUnstable[stable]); + return continuation({ ['#sortedList']: sortedList, ['#sortIndices']: sortIndices, |