-
-
Notifications
You must be signed in to change notification settings - Fork 33.7k
TypeError when route-link with sibling slot used #4584
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
Comments
Same, submitted issue on the vue-router repo #1051. |
the problem The difference seems to be the following between the versions:
So the problem is that
bug The relevant part is here: src/core/vdom/patch.js#L89 solution I think it would be a good idea to add the following lines in if (typeof(vnode) === 'undefined') {
return
} This seems to solve the problem for Vue 2.1.7 and also Vue 2.1.6 when calling It should be analyzed where the error gets introduced (i.e. why Would be glad to help. |
This should actually be the same issue with #4564 and is fixed by #4572 (confirmed for @Darkside73 and @johnleider 's cases) @mmochetti @samuelantonioli you can try the patch in #4572 in your local Vue dist file to see if they are the same issue - if the error persists, they are likely different bugs and please open separate issue with repro. |
it seems that there's the same problem with missing type checking before accessing the attributes in your referenced issue #4584 The relevant part for this bug is here: src/core/instance/render.js#L293. Replacing the current if (
typeof(child) === 'object' &&
(child.context === context || child.functionalContext === context) &&
child.data && (name = child.data.slot)
) {
...
} |
@yyx990803 Thanks, after applying the changes to |
Vue.js version
2.1.7
Reproduction Link
https://jsfiddle.net/1anum7y4/1/
This template fails to compile if no default slot given
It does not reproduce if slot given or
<slot></slot>
wrapped by any tagWhat is Expected?
Component renders without slot
What is actually happening?
Uncaught TypeError: Cannot set property 'isRootInsert' of undefined
The text was updated successfully, but these errors were encountered: