fix(toc): not hiding if too few headings

This commit is contained in:
Elian Doran 2025-02-07 18:27:04 +02:00
parent 2e1b2004dc
commit a98ed6cd29
No known key found for this signature in database

View File

@ -137,7 +137,7 @@ export default class TocWidget extends RightPanelWidget {
this.$toc.append($toc);
}
if (["", "show"].includes(tocLabel?.value ?? "") || headingCount >= (options.getInt("minTocHeadings") ?? 0)) {
if ((tocLabel?.value === "" || tocLabel?.value === "show") || headingCount >= (options.getInt("minTocHeadings") ?? 0)) {
this.toggleInt(true);
this.noteContext.viewScope.tocPreviousVisible = true;
} else {