« get me outta code hell

use atOffset() and .at() where appropriate - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/data/composite/data
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2024-01-14 16:54:45 -0400
committer(quasar) nebula <qznebula@protonmail.com>2024-01-14 16:54:45 -0400
commit6572bd0951d506e4a91366da2ae8d710d5a13a93 (patch)
tree7c95df9fb52eb79ff319e013474ffeae83e79325 /src/data/composite/data
parent40068a42c31bd25ae62f519146513da5f689c1e7 (diff)
use atOffset() and .at() where appropriate
Diffstat (limited to 'src/data/composite/data')
-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 882907f5..4ab0dfb1 100644
--- a/src/data/composite/data/withSortedList.js
+++ b/src/data/composite/data/withSortedList.js
@@ -102,7 +102,7 @@ export default templateCompositeFrom({
               if (empty(accumulator)) {
                 accumulator.push(0);
               } else {
-                const last = accumulator[accumulator.length - 1];
+                const last = accumulator.at(-1);
                 if (collapseEqual) {
                   accumulator.push(last);
                 } else {