-
-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
beforeEnter fire twice on root path ('/') after async next
call
#725
Comments
Hi, thanks for filling this issue. Please follow the Issue Reporting Guidelines and provide a live example on jsfiddle, codepen etc. Thanks! |
The problem occur when I'm doing an asynchronous call in the beforeEnter function. |
Strangely, it happens only on the root path, and only after async next call.. https://jsfiddle.net/2qv45zcq/ |
next
call
Closed via #735 - thanks for fixing your own issue! :D |
Still happens to me, vue 2.3.4, vue-router 2.6.0 |
Still happening. |
Hi, when my app start, beforeEnter is fired twice, dunno why. And since i'm using socket, after this all my sockets emit twice. Am I missing something ?
I'm using vue 2.
UPDATE: this seems to occur because of asynchronous calls in my function.
See this fiddle: https://jsfiddle.net/1xb99hz6/
This is my code :
And my auth function :
in console I get 'in auth' twice in a really short amount of time.
The text was updated successfully, but these errors were encountered: