Просмотр исходного кода

fix(runtime-core): should not return early on text patchFlag

fix vnode updated hook on elements with dynamic text children
Evan You 6 лет назад
Родитель
Сommit
778f3a5e88
1 измененных файлов с 0 добавлено и 2 удалено
  1. 0 2
      packages/runtime-core/src/renderer.ts

+ 0 - 2
packages/runtime-core/src/renderer.ts

@@ -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