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:
authored and GitHub committed 2025-04-05 23:48:47 +09:00
1 parent 477d184fc5
commit ac75858fd2
1 file changed
+3 -2
+3 -2
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>