Skip to content

Add detection of router.beforeEach() without calls to next() #38

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

Open
Olivia5k opened this issue Aug 3, 2017 · 2 comments
Open

Add detection of router.beforeEach() without calls to next() #38

Olivia5k opened this issue Aug 3, 2017 · 2 comments

Comments

@Olivia5k
Copy link

Olivia5k commented Aug 3, 2017

I just spent an embarrassingly large amount of time trying to debug why nothing worked during my migration from 1.0.28. Turns out that the added requirement of the router.beforeEach() methods having to resolve the hook manually with a call to next() was the culprit.

As far as I can see, there is nothing in this project that alerts about this. Now, I lack the vue/js savvy to add that myself, but I suppose this could be of help to others who were using the beforeEach() hooks in 1.0.

Cheers for a fantastic tool anyway!

@chrisvfritz
Copy link
Contributor

chrisvfritz commented Aug 4, 2017

Thanks for reporting this (and sorry to hear about the time you lost)! 😞 What would you think about the warning below?

1. Add next as the 3rd argument of the router.beforeEach hook, then call this function continue resolving the route
  Line 10: ./path/to/file.js
  Reason: The router.beforeEach hook has been updated to accept 3 arguments: to, from, and next
  More info: http://vuejs.org/guide/migration-vue-router.html#router-beforeEach

@Olivia5k
Copy link
Author

Yes, that warning sounds great! It would definitely have saved me the time, haha!

(sorry for the late-ish reply - vacations happened)

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