Skip to content

Commit

Permalink
fix(runtime-core): should update parent host el when component self u…
Browse files Browse the repository at this point in the history
…pdated

fix vuejs#1357
  • Loading branch information
underfin committed Jun 14, 2020
1 parent cf2f278 commit b3e4656
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/runtime-core/src/renderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1304,6 +1304,7 @@ function baseCreateRenderer(
// This is triggered by mutation of component's own state (next: null)
// OR parent calling processComponent (next: VNode)
let { next, bu, u, parent, vnode } = instance
let originNext = next
let vnodeHook: VNodeHook | null | undefined
if (__DEV__) {
pushWarningContext(next || instance.vnode)
Expand Down Expand Up @@ -1355,7 +1356,7 @@ function baseCreateRenderer(
endMeasure(instance, `patch`)
}
next.el = nextTree.el
if (next === null) {
if (originNext === null) {
// self-triggered update. In case of HOC, update parent component
// vnode el. HOC is indicated by parent instance's subTree pointing
// to child component's vnode
Expand Down

0 comments on commit b3e4656

Please sign in to comment.