fix(suspense): fix dynamicChildren tracking when suspense root is a block itself

e.g. `<slot>` inside suspense

fix #4183, fix #4198
This commit is contained in:
Evan You
2021-07-28 16:49:34 -04:00
parent 1867591e7c
commit 51ee84fc6a
2 changed files with 52 additions and 2 deletions

View File

@@ -749,7 +749,7 @@ function normalizeSuspenseSlot(s: any) {
s = singleChild
}
s = normalizeVNode(s)
if (block) {
if (block && !s.dynamicChildren) {
s.dynamicChildren = block.filter(c => c !== s)
}
return s