3.0.1
https://codepen.io/anon/pen/ypjMNx
This only happens if the user gets redirected to the page he is coming from (e.g.: user coming from '/' and going to '/other-route', but gets immediately redirected to '/').
Thanks for the clear repro. Because you stay on the same route, no navigation happens (as if you called next(false)) so afterEach is not called either
@posva and what if i have something like that in beforeEach:
loadingTimeout = setTimeout(
() => app.loading = true,
routerConfig.latencyThreshold,
);
and when app.loading === true i show loading indicator and on afterEach im cleaning timeout and setting loading to false. Because of not calling afterEach my indicator stucks...
If beforeEach is being called then afterEach should be too, its not afterRouteEnter or something like this... its EACH
Thanks
edit:
i made workaround in my particular case, but i have to make multiple checks if given route is string or object if have name or path and is the same as from, i was hoping vue-router will do it for me.
additionally i cant use beforeRouteEnter to avoid this "bug"
Most helpful comment
@posva and what if i have something like that in beforeEach:
loadingTimeout = setTimeout( () => app.loading = true, routerConfig.latencyThreshold, );and when app.loading === true i show loading indicator and on afterEach im cleaning timeout and setting loading to false. Because of not calling afterEach my indicator stucks...
If beforeEach is being called then afterEach should be too, its not afterRouteEnter or something like this... its EACH
Thanks
edit:
i made workaround in my particular case, but i have to make multiple checks if given route is string or object if have name or path and is the same as
from, i was hoping vue-router will do it for me.additionally i cant use beforeRouteEnter to avoid this "bug"