From 5bd2da3172114494fb61d9b5942771f387959fec Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Sat, 24 Feb 2024 11:41:10 -0400 Subject: Revert "data: withSortedList: return proper unstableSortIndices" This reverts commit ac7ceacc2a9c0cdf78e7c9f060d46c6d83ddb7b3. Because the original behavior is mayhaps correct!? --- src/data/composite/data/withSortedList.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/data/composite') 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, -- cgit 1.3.0-6-gf8a5