Skip to content

Commit 0ef441d

Browse files
leo60228towerofnix
authored andcommitted
cleaner optional chaining
1 parent db35dae commit 0ef441d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/static/js/client/sidebar-search.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ export function addPageListeners() {
349349
info.searchInput.addEventListener('keydown', domEvent => {
350350
if (domEvent.key === 'ArrowDown') {
351351
const elem = info.results.firstChild;
352-
if (elem?.classList?.contains?.('wiki-search-result')) {
352+
if (elem?.classList.contains('wiki-search-result')) {
353353
domEvent.preventDefault();
354354
elem.focus({focusVisible: true});
355355
}

0 commit comments

Comments
 (0)