From 64654290be687e0624216bed2339cb484741d6d1 Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Sun, 2 Feb 2025 20:21:35 +0200 Subject: [PATCH] fix(client/ts): regression in table of contents --- src/public/app/widgets/toc.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/public/app/widgets/toc.ts b/src/public/app/widgets/toc.ts index e65b807c1..20fdde57e 100644 --- a/src/public/app/widgets/toc.ts +++ b/src/public/app/widgets/toc.ts @@ -132,10 +132,9 @@ export default class TocWidget extends RightPanelWidget { } } + this.$toc.empty(); if ($toc) { this.$toc.append($toc); - } else { - this.$toc.empty(); } if (["", "show"].includes(tocLabel?.value ?? "") || headingCount >= (options.getInt("minTocHeadings") ?? 0)) {