diff options
author | Hsieh Chin Fan <pham@topo.tw> | 2024-10-01 20:06:25 +0800 |
---|---|---|
committer | Hsieh Chin Fan <pham@topo.tw> | 2024-10-01 20:07:12 +0800 |
commit | 314eeb0a3f72ef94cfbd272489e7c162e6eda2c2 (patch) | |
tree | ef282695db28026722517a196322ed6c17a17ed4 | |
parent | 5c0ce4fb89a93febd4160f0409dca3128bb26544 (diff) |
style: reformat code
-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 | } |