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

Missing named slots throw error #773

Closed
Jexordexan opened this issue Feb 25, 2020 · 2 comments
Closed

Missing named slots throw error #773

Jexordexan opened this issue Feb 25, 2020 · 2 comments

Comments

@Jexordexan
Copy link

Version

3.0.0-alpha.6

Reproduction link

https://codesandbox.io/s/vue-3-named-slot-error-wovpr

Steps to reproduce

Open sandbox, check console.

What is expected?

Named slots skip render if content is missing.

What is actually happening?

Component doesn't render at all, and throws error.

Offending code:
https://github.com/vuejs/vue-next/blob/19a799c28b149b14e85d9e2081fa65ed58d108ba/packages/runtime-core/src/helpers/renderSlot.ts#L23


Stacktrace:

TypeError: Cannot read property 'length' of undefined
    at renderSlot (vue.global.js:9011)
    at Proxy.render (eval at compileToFunction (vue.global.js:10150), <anonymous>:11:7)
    at renderComponentRoot (vue.global.js:5027)
    at componentEffect (vue.global.js:6869)
    at run (vue.global.js:4031)
    at reactiveEffect (vue.global.js:4012)
    at effect (vue.global.js:3997)
    at setupRenderEffect (vue.global.js:6867)
    at mountComponent (vue.global.js:6860)
    at processComponent (vue.global.js:6786)
@underfin
Copy link
Member

3375687

@yyx990803
Copy link
Member

Oh I linked the wrong issue in that commit (it was meant to fix this one)

@github-actions github-actions bot locked and limited conversation to collaborators Nov 15, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants