diff --git a/src/components/widget/TOC.astro b/src/components/widget/TOC.astro index eb55578..126809d 100644 --- a/src/components/widget/TOC.astro +++ b/src/components/widget/TOC.astro @@ -256,6 +256,7 @@ class TableOfContents extends HTMLElement { }; } -customElements.define("table-of-contents", TableOfContents); - +if (!customElements.get("table-of-contents")) { + customElements.define("table-of-contents", TableOfContents); +} \ No newline at end of file