Skip to content

Commit 0d58e08

Browse files
authored
Update mount.ts
1 parent 840736a commit 0d58e08

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

src/mount.ts

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -233,16 +233,7 @@ export function mount(
233233
let component
234234

235235
if (isFunctionalComponent(originalComponent)) {
236-
// we need to wrap it like this so we can capture emitted events.
237-
// we capture events using a mixin that mutates `emit` in `beforeCreate`,
238-
// but functional components do not support mixins, so we need to wrap it
239-
// and make it a non-functional component for testing purposes.
240-
component = defineComponent({
241-
setup: (_, { attrs, slots, emit }) => () => {
242-
return h((props: any, ctx: any) =>
243-
originalComponent(props, { ...ctx, ...attrs, emit, slots })
244-
)
245-
}
236+
component = setup: (_, { attrs, slots }) => () => h(originalComponent, attrs, slots)
246237
})
247238
} else if (isObjectComponent(originalComponent)) {
248239
component = { ...originalComponent }

0 commit comments

Comments
 (0)