From 314eeb0a3f72ef94cfbd272489e7c162e6eda2c2 Mon Sep 17 00:00:00 2001 From: Hsieh Chin Fan Date: Tue, 1 Oct 2024 20:06:25 +0800 Subject: style: reformat code --- src/dumbyUtils.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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) { const nextIndex = index === -1 ? 0 : (index + (reverse ? -1 : 1)) % blocks.length; - const nextBlock = blocks.at(nextIndex); blocks.forEach(b => b.classList.remove('focus')); + const nextBlock = blocks.at(nextIndex); nextBlock?.classList?.add('focus'); scrollToBlock(nextBlock); } -- cgit v1.2.3-70-g09d2