Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion quartz/components/scripts/explorer.inline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ function toggleExplorer(this: HTMLElement) {
if (!content) return

content.classList.toggle("collapsed")
content.style.maxHeight = content.style.maxHeight === "0px" ? content.scrollHeight + "px" : "0px"
content.style.maxHeight = content.classList.contains("collapsed") ? "0px" : content.scrollHeight + "px"
}

function toggleFolder(evt: MouseEvent) {
Expand Down
2 changes: 1 addition & 1 deletion quartz/components/scripts/toc.inline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ function toggleToc(this: HTMLElement) {
const content = this.nextElementSibling as HTMLElement | undefined
if (!content) return
content.classList.toggle("collapsed")
content.style.maxHeight = content.style.maxHeight === "0px" ? content.scrollHeight + "px" : "0px"
content.style.maxHeight = content.classList.contains("collapsed") ? "0px" : content.scrollHeight + "px"
}

function setupToc() {
Expand Down