Skip to content

Commit 732a3f2

Browse files
committed
fix(runtime-core): when props are of type ref, they lose data and don't stay responsive
1 parent 5cef52a commit 732a3f2

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

packages/runtime-core/src/vnode.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -617,6 +617,9 @@ function _createVNode(
617617

618618
export function guardReactiveProps(props: (Data & VNodeProps) | null) {
619619
if (!props) return null
620+
if (isRef(props)) {
621+
return { value: props.value }
622+
}
620623
return isProxy(props) || isInternalObject(props) ? extend({}, props) : props
621624
}
622625

0 commit comments

Comments
 (0)