Update sidebar.js

fix bug https://github.com/docsifyjs/docsify/issues/1110
This commit is contained in:
CHUXK
2020-04-10 11:28:32 +08:00
committed by GitHub
parent 957609a209
commit d32d91bebc
+2 -1
View File
@@ -38,7 +38,8 @@ export function collapse(el) {
dom.on(el, 'click', ({ target }) => {
if (
target.nodeName === 'A' &&
target.nextSibling &&
target.nextSibling &&
target.nextSibling.classList &&
target.nextSibling.classList.contains('app-sub-sidebar')
) {
dom.toggleClass(target.parentNode, 'collapse');