mirror of https://github.com/vuejs/core.git
fix(runtime-core): always pass context arg to functional components
This commit is contained in:
parent
ba391f5fdf
commit
37836c5796
|
@ -110,24 +110,19 @@ export function renderComponentRoot(
|
|||
markAttrsAccessed()
|
||||
}
|
||||
result = normalizeVNode(
|
||||
render.length > 1
|
||||
? render(
|
||||
__DEV__ ? shallowReadonly(props) : props,
|
||||
__DEV__
|
||||
? {
|
||||
get attrs() {
|
||||
markAttrsAccessed()
|
||||
return shallowReadonly(attrs)
|
||||
},
|
||||
slots,
|
||||
emit,
|
||||
}
|
||||
: { attrs, slots, emit },
|
||||
)
|
||||
: render(
|
||||
__DEV__ ? shallowReadonly(props) : props,
|
||||
null as any /* we know it doesn't need it */,
|
||||
),
|
||||
render(
|
||||
__DEV__ ? shallowReadonly(props) : props,
|
||||
__DEV__
|
||||
? {
|
||||
get attrs() {
|
||||
markAttrsAccessed()
|
||||
return shallowReadonly(attrs)
|
||||
},
|
||||
slots,
|
||||
emit,
|
||||
}
|
||||
: { attrs, slots, emit },
|
||||
),
|
||||
)
|
||||
fallthroughAttrs = Component.props
|
||||
? attrs
|
||||
|
|
Loading…
Reference in New Issue