Update WidgetLayout.astro (#333)

防止重复注册报错
This commit is contained in:
会做饭的二哈 authored and GitHub committed 2025-04-05 23:45:33 +09:00
1 parent 0f73053fc7
commit 477d184fc5
1 file changed
+4 -2
+4 -2
View File
@@ -54,5 +54,7 @@ const className = Astro.props.class
}
}
customElements.define('widget-layout', WidgetLayout);
</script>
if (!customElements.get("widget-layout")) {
customElements.define("widget-layout", WidgetLayout);
}
</script>