« get me outta code hell

data: withSortedList: return proper unstableSortIndices - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/data
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2024-02-24 11:03:53 -0400
committer(quasar) nebula <qznebula@protonmail.com>2024-02-24 13:35:52 -0400
commit8cb3aeb80de01a82f4f2309a21181b389419aef9 (patch)
treed9d288f2c825a1214e169cdc8b54d703190aa99c /src/data
parent716fe469bdfef789357a57d61dd69291491a1d4f (diff)
data: withSortedList: return proper unstableSortIndices
(instead of nonsense)

repeated runs indicate this is probably deterministic, so still
more to investigate for withThingsSortedAlphabetically
Diffstat (limited to 'src/data')
-rw-r--r--src/data/composite/data/withSortedList.js5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/data/composite/data/withSortedList.js b/src/data/composite/data/withSortedList.js
index a7942ab4..c86d1989 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 stableToUnstable =
+        const unstableSortIndices =
           symbols
             .map((current, index) => {
               if (index === 0) {
@@ -117,9 +117,6 @@ export default templateCompositeFrom({
               return accumulator;
             }, [0]);
 
-        const unstableSortIndices =
-          sortIndices.map(stable => stableToUnstable[stable]);
-
         return continuation({
           ['#sortedList']: sortedList,
           ['#sortIndices']: sortIndices,