Skip to content

Commit

Permalink
fix(runtime-core): should not return early on text patchFlag
Browse files Browse the repository at this point in the history
fix vnode updated hook on elements with dynamic text children
  • Loading branch information
yyx990803 committed Feb 10, 2020
1 parent 571ed42 commit 778f3a5
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions packages/runtime-core/src/renderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -542,12 +542,10 @@ export function createRenderer<

// text
// This flag is matched when the element has only dynamic text children.
// this flag is terminal (i.e. skips children diffing).
if (patchFlag & PatchFlags.TEXT) {
if (n1.children !== n2.children) {
hostSetElementText(el, n2.children as string)
}
return // terminal
}
} else if (!optimized && dynamicChildren == null) {
// unoptimized, full diff
Expand Down

0 comments on commit 778f3a5

Please sign in to comment.