From c59897c7b0dbd82b5bbf3fbca945c0639ac37fb8 Mon Sep 17 00:00:00 2001 From: edison Date: Fri, 4 Dec 2020 01:17:04 +0800 Subject: [PATCH] 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. --- packages/runtime-core/src/renderer.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/runtime-core/src/renderer.ts b/packages/runtime-core/src/renderer.ts index 646631507d4..3baaf2405ea 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