Update WidgetLayout.astro (#333)

防止重复注册报错
This commit is contained in:
会做饭的二哈 2025-04-05 22:45:33 +08:00 committed by GitHub
parent 0f73053fc7
commit 477d184fc5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -54,5 +54,7 @@ const className = Astro.props.class
} }
} }
customElements.define('widget-layout', WidgetLayout); if (!customElements.get("widget-layout")) {
customElements.define("widget-layout", WidgetLayout);
}
</script> </script>