Skip to content

Commit 280829b

Browse files
authored
fix(runtime-vapor): ensure props are shallow reactive in VDOM component (#13502)
1 parent 2074d66 commit 280829b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/runtime-vapor/src/vdomInterop.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import {
1616
isEmitListener,
1717
onScopeDispose,
1818
renderSlot,
19+
shallowReactive,
1920
shallowRef,
2021
simpleSetCurrentInstance,
2122
} from '@vue/runtime-dom'
@@ -163,7 +164,8 @@ function createVDOMComponent(
163164

164165
// overwrite how the vdom instance handles props
165166
vnode.vi = (instance: ComponentInternalInstance) => {
166-
instance.props = wrapper.props
167+
// ensure props are shallow reactive to align with VDOM behavior.
168+
instance.props = shallowReactive(wrapper.props)
167169

168170
const attrs = (instance.attrs = createInternalObject())
169171
for (const key in wrapper.attrs) {

0 commit comments

Comments
 (0)