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

import as Async component way with Vue.extend beforeRouteLeave throw error parentVal.concat is not a function #3004

Open
Bee777 opened this issue Oct 21, 2019 · 2 comments
Labels
bug
Projects

Comments

@Bee777
Copy link

@Bee777 Bee777 commented Oct 21, 2019

Version

3.0.3, also 3.1.3

Reproduction link

https://codesandbox.io/s/vue-template-1148z

Steps to reproduce

To see the error:

  1. Enter a page for the target route, not by $router.push but manually enter the url target and press enter on keyboard
  2. See error on browser console.

What is expected?

Get into the page as usually without the error.

What is actually happening?

When entered the page got the error:

vue-router.esm.js?8c4f:2079 TypeError: parentVal.concat is not a function
at mergeHook (vue.runtime.esm.js?2b0e:1272)
at mergeField (vue.runtime.esm.js?2b0e:1552)
at mergeOptions (vue.runtime.esm.js?2b0e:1543)
at Function.Vue.extend (vue.runtime.esm.js?2b0e:5153)


To make its work 3 ways:

  1. import as a normal not async way.
  2. combine import as a normal and import as async way.
  3. just remove the beforeRouteLeave.
@Bee777 Bee777 changed the title Async component with Vue.extend beforeRouteLeave throw error parentVal.concat is not a function import as Async component way with Vue.extend beforeRouteLeave throw error parentVal.concat is not a function Oct 21, 2019
@posva

This comment has been minimized.

Copy link
Member

@posva posva commented Oct 21, 2019

Please provide a boiled down runnable repro, not just the code sample. Ping when you got a working repro or open a new issue

@posva posva closed this Oct 21, 2019
@Bee777

This comment has been minimized.

Copy link
Author

@Bee777 Bee777 commented Oct 21, 2019

@posva Now i have created the codesandbox that you can run.
Please take a look there:
The error will show when you try to refresh the async component page which is /async.

https://codesandbox.io/s/vue-template-1148z

@posva posva added the bug label Oct 22, 2019
@posva posva reopened this Oct 22, 2019
@posva posva added this to Long term road (high prio, low complex) in Longterm Oct 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Longterm
Long term road (high prio, low complex)
2 participants
You can’t perform that action at this time.