fix(compiler-core): detected forwarded slots in nested components (#4268)

fix #4244
This commit is contained in:
fishDog
2021-08-07 10:37:55 +08:00
committed by GitHub
parent a211e271ee
commit abb3a81e87
2 changed files with 8 additions and 3 deletions

View File

@@ -384,9 +384,7 @@ function hasForwardedSlots(children: TemplateChildNode[]): boolean {
case NodeTypes.ELEMENT:
if (
child.tagType === ElementTypes.SLOT ||
((child.tagType === ElementTypes.ELEMENT ||
child.tagType === ElementTypes.TEMPLATE) &&
hasForwardedSlots(child.children))
hasForwardedSlots(child.children)
) {
return true
}