-
-
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
Handle Promise rejection in guards (fix #2833) #2838
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, thanks for the PR!
However, we don't use babel to transpile the lib, so this won't work (it is used with tests). Could you find a version without adding the babel plugin dependency?
Can you also add the tests for the others navigation guards, so they are all covered? beforeEnter, beforeRouteEnter, beforeRouteUpdate
Also, could you please add back the template for the PR? It helps us to organise things
Thanks
Very interesting, solved without a library :)
What is a template? |
Hey! I realized you closed the issue. Did something happen? Maybe it was closed by accident?
Eduardo San Martin Morote
… On 2 Jul 2019, at 22:09, Alexey Khrushch ***@***.***> wrote:
Closed #2838.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
|
I studied this code, found 2 places ( https://github.com/vuejs/vue-router/pull/2838/files#diff-feafce5e816936212eccd6808c5421a6R123 And if in the first case the execution of the code, the sequence itself does not change, in the second case it is not so (R185). If we take into account that everything happens through callbacks, then in the function In general, I do not like it, I understand that most likely I need to wrap parts of the code in Promise, do consistent error handling and not break the original logic. Since this PR has errors in logic, I decided to close it, so that suddenly due to inactivity, they would not begin to accept it :) |
Thanks for the explanation. I wanted to make sure it wasn't an accident :) |
#2833