« get me outta code hell

hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/data/composite/data/withSortedList.js8
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,