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

@@ -778,6 +778,13 @@ describe('compiler: transform component slots', () => {
)
expect(slots).toMatchObject(toMatch)
})
test('<slot w/ nested component>', () => {
const { slots } = parseWithSlots(
`<Comp><Comp><slot/></Comp></Comp>`
)
expect(slots).toMatchObject(toMatch)
})
})
describe('errors', () => {