Skip to content

Commit 2744b91

Browse files
committed
fix: Cannot read property classList of null
#1527 (comment)
1 parent 33c8c4a commit 2744b91

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/plugins/search/component.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,8 +160,8 @@ function doSearch(value) {
160160
$clearBtn.classList.add('show');
161161
$panel.innerHTML = html || `<p class="empty">${NO_DATA_TEXT}</p>`;
162162
if (options.hideOtherSidebarContent) {
163-
$sidebarNav.classList.add('hide');
164-
$appName.classList.add('hide');
163+
$sidebarNav && $sidebarNav.classList.add('hide');
164+
$appName && $appName.classList.add('hide');
165165
}
166166
}
167167

0 commit comments

Comments
 (0)