diff options
author | leo60228 <leo@60228.dev> | 2024-09-14 18:11:52 -0400 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2025-01-10 18:51:26 -0400 |
commit | 135811201a999ec21d60a2380ddd870311679704 (patch) | |
tree | db2a06cccc07a95c0f666364b3765d49efd2ecfb | |
parent | e7f9ff5a305e049ca7204995e9377c32162da889 (diff) |
cleaner optional chaining
-rw-r--r-- | src/static/js/client/sidebar-search.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/static/js/client/sidebar-search.js b/src/static/js/client/sidebar-search.js index 48bc8d08..2d346b41 100644 --- a/src/static/js/client/sidebar-search.js +++ b/src/static/js/client/sidebar-search.js @@ -349,7 +349,7 @@ export function addPageListeners() { info.searchInput.addEventListener('keydown', domEvent => { if (domEvent.key === 'ArrowDown') { const elem = info.results.firstChild; - if (elem?.classList?.contains?.('wiki-search-result')) { + if (elem?.classList.contains('wiki-search-result')) { domEvent.preventDefault(); elem.focus({focusVisible: true}); } |