FIX: Compatibility with discourse-docs plugin (#37)

This commit is contained in:
Penar Musaraj 2022-05-09 14:09:59 -04:00 committed by GitHub
parent 2f2c9f387d
commit 5d69a72200
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 1 deletions

View File

@ -236,4 +236,7 @@ a.d-toc-close {
.mobile-view & { .mobile-view & {
display: none; display: none;
} }
.d-toc-main {
display: block;
}
} }

View File

@ -159,7 +159,13 @@ export default {
}, },
clickTOC(e) { clickTOC(e) {
if (!document.body.classList.contains("d-toc-timeline-visible")) { const classNames = ["d-toc-timeline-visible", "archetype-docs-topic"];
if (
!classNames.some((className) =>
document.body.classList.contains(className)
)
) {
return; return;
} }