Skip to content

Commit 92cc7f7

Browse files
committed
fix: default undefined props to {}
1 parent 2f4ec5b commit 92cc7f7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/utils/script-setup.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ function processDefineProps(node: Expression, context: Context): string | undefi
9595
}
9696

9797
context.ctx.propsTypeDecl = propsTypeDecl
98-
const propsStr = context.utils.extractRuntimeProps(context.ctx)
98+
const propsStr = context.utils.extractRuntimeProps(context.ctx) || '{}'
9999

100100
return `${DEFINE_PROPS}(${propsStr})`
101101
}

0 commit comments

Comments
 (0)