mirror of
https://gitee.com/docsifyjs/docsify.git
synced 2024-11-30 02:58:37 +08:00
fix: Cannot read property 'classList' of null (#1527)
* fix: Cannot read property 'classList' of null * fix: Cannot read property classList of null https://github.com/docsifyjs/docsify/pull/1527#issuecomment-793455105
This commit is contained in:
parent
b8653e1f32
commit
d6df2b85a9
@ -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;
|
||||
@ -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');
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user