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
The callback (let's call it CB) that's passed to next() only gets called for an instance of component that is mounted first. Any transitions to other instances of that component do trigger beforeRouteEnter hook, but CB doesn't get called. However, if you transition to other instances, and then back to the first one, CB gets called again.
Actual console output:
beforeRouteEnter:
vue-component-3: mounted
vm.title: first_a
beforeRouteEnter:
<-- missing output: vm.title: first_b
beforeRouteEnter:
vue-component-4: mounted
vm.title: second_a
beforeRouteEnter:
<-- missing output: vm.title: second_b
beforeRouteEnter:
vm.title: first_b <-- this is another bug, which is already reported, issue 2062
vue-component-3: mounted
This behaviour appeared somewhere between Vue versions 2.5.13 and 2.5.16, (almost) everything is fine with 2.5.13:
Version
3.0.1
Reproduction link
http://jsfiddle.net/09Lom5h4/3/
Steps to reproduce
Reproduced with Vue 2.5.16.
What is expected?
Callback passed to next() call in beforeRouteEnter hook must be called at all times.
Expected console output:
What is actually happening?
Something very peculiar.
The callback (let's call it CB) that's passed to next() only gets called for an instance of component that is mounted first. Any transitions to other instances of that component do trigger beforeRouteEnter hook, but CB doesn't get called. However, if you transition to other instances, and then back to the first one, CB gets called again.
Actual console output:
This behaviour appeared somewhere between Vue versions 2.5.13 and 2.5.16, (almost) everything is fine with 2.5.13:
http://jsfiddle.net/09Lom5h4/4/
I said almost fine, because it overlaps with another bug:
#2062
I've actually used the JSFiddle from that issue to demonstrate this one.
The text was updated successfully, but these errors were encountered: