From: edison Date: Thu, 3 Dec 2020 17:17:04 +0000 (+0800) Subject: fix(runtime-core): skip patchBlockChildren if n1.dynamicChildren is null (#2717) X-Git-Tag: v3.0.5~44 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c59897c7b0dbd82b5bbf3fbca945c0639ac37fb8;p=thirdparty%2Fvuejs%2Fcore.git fix(runtime-core): skip patchBlockChildren if n1.dynamicChildren is null (#2717) fix #2715 The bug was introduced by #2485 where a compiled slot may result in a bailed Fragment which then gets its dynamicChildren set to `null` by the renderer. --- diff --git a/packages/runtime-core/src/renderer.ts b/packages/runtime-core/src/renderer.ts index 646631507d..3baaf2405e 100644 --- a/packages/runtime-core/src/renderer.ts +++ b/packages/runtime-core/src/renderer.ts @@ -1139,12 +1139,15 @@ function baseCreateRenderer( if ( patchFlag > 0 && patchFlag & PatchFlags.STABLE_FRAGMENT && - dynamicChildren + dynamicChildren && + // #2715 the previous fragment could've been a BAILed one as a result + // of renderSlot() with no valid children + n1.dynamicChildren ) { // a stable fragment (template root or