Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: #874 setup return object with type of Module #875

Merged
merged 1 commit into from Dec 27, 2021
Merged

Conversation

xialvjun
Copy link
Contributor

isPlainObject is too strict for the returning value of setup function. Sometimes user may return { ...refs } in setup function, and Symbol(Symbol.toStringTag) in refs (eg: refs is a ESModule object), then { ...refs } will inherit that symbol property, then isPlainObject({ ...refs }) === false which may not that intuitive.

Besides, vue3 use isObject too. https://github.com/vuejs/vue-next/blob/87c86e4cc2/packages/runtime-core/src/component.ts#L688

@antfu antfu merged commit a1a3e11 into vuejs:main Dec 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants