mirror of
https://gitee.com/vuejs/vue.git
synced 2024-11-30 02:57:43 +08:00
fix create hooks duplicate invocation
This commit is contained in:
parent
3f2fb1fb03
commit
48a5b429c0
@ -54,7 +54,10 @@ export default function Component (Ctor, data, parent, children) {
|
||||
}
|
||||
|
||||
// return a placeholder vnode
|
||||
const vnode = VNode('vue-component-' + Ctor.cid, data)
|
||||
const id = `vue-component-${Ctor.cid}${
|
||||
Ctor.options.name ? `-${Ctor.options.name}` : ''
|
||||
}`
|
||||
const vnode = VNode(id, data)
|
||||
vnode.componentOptions = { Ctor, propsData, listeners, parent, children }
|
||||
return vnode
|
||||
}
|
||||
|
@ -71,7 +71,6 @@ export default function createPatchFunction (backend) {
|
||||
// in that case we can just return the element and be done.
|
||||
if (isDef(i = vnode.child)) {
|
||||
invokeCreateHooks(vnode, insertedVnodeQueue)
|
||||
invokeCreateHooks(i._vnode, insertedVnodeQueue)
|
||||
return vnode.elm
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user