fix(compiler-core): fix forwarded slots detection on template slots (#4124)

fix #4123
This commit is contained in:
edison
2021-07-15 23:37:11 +08:00
committed by GitHub
parent 6a0c7cd905
commit c23153d82e
2 changed files with 9 additions and 1 deletions

View File

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