From: Evan You Date: Mon, 11 May 2020 19:46:30 +0000 (-0400) Subject: fix(hmr): static child traversal should only affect elements X-Git-Tag: v3.0.0-beta.12~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2bc6a8c1cf4f409eea0cefa8b8a7619aae1f3569;p=thirdparty%2Fvuejs%2Fcore.git fix(hmr): static child traversal should only affect elements --- diff --git a/packages/runtime-core/src/renderer.ts b/packages/runtime-core/src/renderer.ts index 359648b531..3050f401b5 100644 --- a/packages/runtime-core/src/renderer.ts +++ b/packages/runtime-core/src/renderer.ts @@ -1984,7 +1984,12 @@ function baseCreateRenderer( for (let i = 0; i < ch1.length; i++) { const c1 = ch1[i] const c2 = ch2[i] - if (isVNode(c1) && isVNode(c2) && !c2.dynamicChildren) { + if ( + isVNode(c1) && + isVNode(c2) && + c2.shapeFlag & ShapeFlags.ELEMENT && + !c2.dynamicChildren + ) { if (c2.patchFlag <= 0) { c2.el = c1.el }