« get me outta code hell

toReversed, toSorted miscellany - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/static/js/client/sticky-heading.js
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2025-10-15 13:56:54 -0300
committer(quasar) nebula <qznebula@protonmail.com>2025-10-15 13:56:54 -0300
commit84a98b3b71d5524baf7b5e9038909ad501203115 (patch)
treee9702cbdefd19ac7259e4b9d918709fcd62fcfd0 /src/static/js/client/sticky-heading.js
parent74bd087bb01c759b1bf38c9bc445e42b43684276 (diff)
toReversed, toSorted miscellany
Diffstat (limited to 'src/static/js/client/sticky-heading.js')
-rw-r--r--src/static/js/client/sticky-heading.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/static/js/client/sticky-heading.js b/src/static/js/client/sticky-heading.js
index 4660013a..1318ca0b 100644
--- a/src/static/js/client/sticky-heading.js
+++ b/src/static/js/client/sticky-heading.js
@@ -255,7 +255,7 @@ function getContentHeadingClosestToStickySubheading(index) {
 
   // Iterate from bottom to top of the content area.
   const contentHeadings = info.contentHeadings[index];
-  for (const heading of contentHeadings.slice().reverse()) {
+  for (const heading of contentHeadings.toReversed()) {
     if (heading.nodeName === 'SUMMARY' && !heading.closest('details').open) {
       continue;
     }