You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Redirection is a commonly used function, I think that this error should not be thrown frequently or provide a function to choose whether to throw an error.
By the way, why should this exception be thrown, and what is its purpose?
I use Google Translate, which may cause difficulty in understanding...
This has been extensively explained at #2881 (comment) where it explains how to adapt the behavior. There is also an upcoming PR #3220 to add the necessary API to handle this correctly
To make it short, it always was considered an error before, so with Promises, it had to be a rejection (see example using 3.0.0 https://jsfiddle.net/zoh1dj6w/). This is no longer the case in v4, where navigation failures are not promise rejections anymore and a redirection is considered a successful navigation but changing it on v3 would be a breaking change so it only changed on v4
To make it short, it always was considered an error before, so with Promises, it had to be a rejection (see example using 3.0.0 https://jsfiddle.net/zoh1dj6w/). This is no longer the case in v4, where navigation failures are not promise rejections anymore and a redirection is considered a successful navigation
What problem does this feature solve?
when router has redirect I got this error:
Redirected when going from "/a" to "/b" via a navigation guard.
I found this line of code(199-200):
vue-router/src/history/base.js
Lines 194 to 209 in b0ef497
Redirection is a commonly used function, I think that this error should not be thrown frequently or provide a function to choose whether to throw an error.
By the way, why should this exception be thrown, and what is its purpose?
What does the proposed API look like?
The text was updated successfully, but these errors were encountered: