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

Vue route object gets freeze by vue's core #8091

Closed
furyscript opened this issue Apr 26, 2018 · 1 comment
Closed

Vue route object gets freeze by vue's core #8091

furyscript opened this issue Apr 26, 2018 · 1 comment

Comments

@furyscript
Copy link

furyscript commented Apr 26, 2018

Version

2.5.13

Reproduction link

https://github.com/samturrell/vue-breadcrumbs/tree/master/example

Steps to reproduce

I'm using this plugin https://github.com/samturrell/vue-breadcrumbs but have a problem by getting the route params using for breadcrumb.
The problem, as you can see on open issue samturrell/vue-breadcrumbs#1 , is that vue-router freeze the object and it's impossibile to manage params.
It's easy to reproduce, just install plugin and create two route with dynamic params. Links aren't replace when found :id (or something) but they keeps string literally.

You can find example in link

What is expected?

Get route params chain

What is actually happening?

Just explain into steps to reproduce

@furyscript furyscript changed the title Vue router Vue route object gets freeze by vue's core Apr 26, 2018
@yyx990803
Copy link
Member

  1. This is a 3rd party plugin issue.

  2. Even if it's related to Vue, it should be reported to the vue-router repo.

  3. The route object is an immutable mapping of the current URL. This is by design. You should never attempt to mutate the route object. Instead, trigger a navigation with $router.push.

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

No branches or pull requests

2 participants