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(element): return correct element for component which renders other component while passing array of vnodes in default slot #1789

Merged
merged 1 commit into from Oct 3, 2022

Conversation

xanf
Copy link
Collaborator

@xanf xanf commented Oct 3, 2022

While rendering array of vnodes in slot is discouraged (Vue complains about it and suggest using function for default slot for performance) - it is still valid according to https://vuejs.org/guide/extras/render-function.html#creating-vnodes

// children array can contain mixed vnodes and strings
h('div', ['hello', h('span', 'hello')])

This fixes for me multiple tests wheb using @vue/compat with legacy codebase, where rendering array of vnodes was considered more performant :(

* return correct element for component which renders other component
while passing array of vnodes in default slot
@netlify
Copy link

netlify bot commented Oct 3, 2022

Deploy Preview for vue-test-utils-docs ready!

Name Link
🔨 Latest commit cff35cc
🔍 Latest deploy log https://app.netlify.com/sites/vue-test-utils-docs/deploys/633a84686dde8e000831b5d4
😎 Deploy Preview https://deploy-preview-1789--vue-test-utils-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@cexbrayat cexbrayat merged commit 6212c2c into main Oct 3, 2022
7 checks passed
@cexbrayat cexbrayat deleted the xanf-fix-array-of-vnodes branch October 3, 2022 06:56
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