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
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -256,6 +256,7 @@ class TableOfContents extends HTMLElement {
};
}
if (!customElements.get("table-of-contents")) {
customElements.define("table-of-contents", TableOfContents);
}
</script>