Skip to content

Commit

Permalink
fix: Cannot read property 'classList' of null (#1527)
Browse files Browse the repository at this point in the history
* fix: Cannot read property 'classList' of null

* fix: Cannot read property classList of null

#1527 (comment)
  • Loading branch information
sy-records authored Mar 12, 2021
1 parent b8653e1 commit d6df2b8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/plugins/search/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,8 @@ function doSearch(value) {
$panel.innerHTML = '';

if (options.hideOtherSidebarContent) {
$sidebarNav.classList.remove('hide');
$appName.classList.remove('hide');
$sidebarNav && $sidebarNav.classList.remove('hide');
$appName && $appName.classList.remove('hide');
}

return;
Expand All @@ -160,8 +160,8 @@ function doSearch(value) {
$clearBtn.classList.add('show');
$panel.innerHTML = html || `<p class="empty">${NO_DATA_TEXT}</p>`;
if (options.hideOtherSidebarContent) {
$sidebarNav.classList.add('hide');
$appName.classList.add('hide');
$sidebarNav && $sidebarNav.classList.add('hide');
$appName && $appName.classList.add('hide');
}
}

Expand Down

1 comment on commit d6df2b8

@vercel
Copy link

@vercel vercel bot commented on d6df2b8 Mar 12, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.