fix: check whether the component is defined already (#337)

Co-authored-by: Matas <automatasz@users.noreply.github.com>
Co-authored-by: Katsuyuki Karasawa <4ranci0ne@gmail.com>
This commit is contained in:
Matas
2025-04-05 17:48:47 +03:00
committed by GitHub
parent 477d184fc5
commit ac75858fd2

View File

@@ -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);
}
</script>