diff options
Diffstat (limited to 'src/dumbyUtils.mjs')
-rw-r--r-- | src/dumbyUtils.mjs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dumbyUtils.mjs b/src/dumbyUtils.mjs index 71dc290..2a9b787 100644 --- a/src/dumbyUtils.mjs +++ b/src/dumbyUtils.mjs | |||
@@ -22,8 +22,8 @@ export function focusNextBlock(reverse = false) { | |||
22 | const nextIndex = | 22 | const nextIndex = |
23 | index === -1 ? 0 : (index + (reverse ? -1 : 1)) % blocks.length; | 23 | index === -1 ? 0 : (index + (reverse ? -1 : 1)) % blocks.length; |
24 | 24 | ||
25 | const nextBlock = blocks.at(nextIndex); | ||
26 | blocks.forEach(b => b.classList.remove('focus')); | 25 | blocks.forEach(b => b.classList.remove('focus')); |
26 | const nextBlock = blocks.at(nextIndex); | ||
27 | nextBlock?.classList?.add('focus'); | 27 | nextBlock?.classList?.add('focus'); |
28 | scrollToBlock(nextBlock); | 28 | scrollToBlock(nextBlock); |
29 | } | 29 | } |