« get me outta code hell

data: withSortedList: map sortIndices same as unstableSortIndices - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2024-02-24 13:14:13 -0400
committer(quasar) nebula <qznebula@protonmail.com>2024-02-24 13:35:53 -0400
commit2305b97297a144aaccf32dde0fdf7321a0b0bec7 (patch)
tree12423e117c4985b943596ec77b8b9ca3f341b22b
parentf78074bf722c4c88ff0914ee71028c2fbfd2a754 (diff)
data: withSortedList: map sortIndices same as unstableSortIndices
Instead of the flipwise direction.
-rw-r--r--src/data/composite/data/withSortedList.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/data/composite/data/withSortedList.js b/src/data/composite/data/withSortedList.js
index 81a06e76..2fde30b1 100644
--- a/src/data/composite/data/withSortedList.js
+++ b/src/data/composite/data/withSortedList.js
@@ -98,7 +98,6 @@ export default templateCompositeFrom({
 
         for (const [stableIndex, symbol] of symbols.entries()) {
           const sourceIndex = symbolToIndex.get(symbol);
-          stableSortIndices.push(sourceIndex);
           sortedList.push(list[sourceIndex]);
 
           if (stableIndex > 0) {
@@ -108,6 +107,7 @@ export default templateCompositeFrom({
             }
           }
 
+          stableSortIndices[sourceIndex] = stableIndex;
           unstableSortIndices[sourceIndex] = unstableIndex;
         }