From 6b4d214b92b54817fff33b52bd3c8a810c6b2311 Mon Sep 17 00:00:00 2001 From: Yuxuan Zhang Date: Fri, 11 Apr 2025 05:10:13 -0400 Subject: [PATCH] improve ClientOnly component: pass down props --- src/client/app/components/ClientOnly.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/client/app/components/ClientOnly.ts b/src/client/app/components/ClientOnly.ts index edbb1066..1781a371 100644 --- a/src/client/app/components/ClientOnly.ts +++ b/src/client/app/components/ClientOnly.ts @@ -7,10 +7,10 @@ export const ClientOnly = defineComponent({ default: true } }, - setup({ isClientOnly }, { slots }) { + setup(props, { slots }) { // Programmatically determine if this component should be // client-only based on the presence of the isClientOnly attribute. - if (!isClientOnly) return () => slots.default?.() || null + if (!props.isClientOnly) return () => slots.default?.(props) || null const show = ref(false)