From a98ed6cd29148e64cc1612daa1e034d4315c3625 Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Fri, 7 Feb 2025 18:27:04 +0200 Subject: [PATCH] fix(toc): not hiding if too few headings --- src/public/app/widgets/toc.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/public/app/widgets/toc.ts b/src/public/app/widgets/toc.ts index 20fdde57e..a232fe6ce 100644 --- a/src/public/app/widgets/toc.ts +++ b/src/public/app/widgets/toc.ts @@ -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 {