Skip to content

Commit

Permalink
fix: fix resolveComponent error
Browse files Browse the repository at this point in the history
  • Loading branch information
yiyunwan committed Oct 19, 2023
1 parent 5e973e9 commit 09fff1c
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,11 @@ export const resolveComponent = (child?: SlotTypes, props?: Record<string, any>)
if (child) {
if (typeof child === 'string' || typeof child === 'number') {
return child
} else if (typeof child === 'function') {
return (child as Function)(props)
} else if (isVnode(child)) {
return child
} else {
const Com = toRaw(child as DefineComponent)
return <Com {...Com} />
return <Com {...props} />
}
}

Expand Down

0 comments on commit 09fff1c

Please sign in to comment.