fix(client/ts): regression in table of contents

This commit is contained in:
Elian Doran
2025-02-02 20:21:35 +02:00
parent d0317f4bb6
commit 64654290be

View File

@@ -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)) {