diff options
author | Hsieh Chin Fan <pham@topo.tw> | 2024-09-30 15:19:58 +0800 |
---|---|---|
committer | Hsieh Chin Fan <pham@topo.tw> | 2024-10-01 11:35:11 +0800 |
commit | 193ba872c455296bff55e5f6a7d6dbbbb85c265e (patch) | |
tree | b8ebc942676865f52b1d73e05796a82de080ba92 /src/MenuItem.mjs | |
parent | cdd0f2bef5c522eb6809ba58d7d9adc2eb4bd6b3 (diff) |
style: way to manage Element.children
Diffstat (limited to 'src/MenuItem.mjs')
-rw-r--r-- | src/MenuItem.mjs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/MenuItem.mjs b/src/MenuItem.mjs index 9830bf4..f4cd518 100644 --- a/src/MenuItem.mjs +++ b/src/MenuItem.mjs | |||
@@ -150,7 +150,7 @@ export class Suggestion { | |||
150 | } | 150 | } |
151 | option.classList.add('container__suggestion'); | 151 | option.classList.add('container__suggestion'); |
152 | option.onmouseover = () => { | 152 | option.onmouseover = () => { |
153 | Array.from(option.parentElement?.children ?? []).forEach(s => | 153 | Array.from(option.parentElement?.children)?.forEach(s => |
154 | s.classList.remove('focus'), | 154 | s.classList.remove('focus'), |
155 | ); | 155 | ); |
156 | option.classList.add('focus'); | 156 | option.classList.add('focus'); |