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
This is probably related to #1722
The route object gets normalized and the array is stripped off, making the route change fire twice.
As a temporary workaround, you can remove empty arrays from query objects
Version
2.7.0
Reproduction link
http://jsfiddle.net/a9v43732/
Steps to reproduce
go to foo
then click 'beforeRouteUpdate' button
beforeRouteUpdate fire twice when query contain empty array []
eg.
this.$router.push({query: {a: Math.random(), b: []}})
beforeRouteUpdate fire twice
this.$router.push({query: {a: Math.random(), b: [1]}})
beforeRouteUpdate fire once
What is expected?
this.$router.push({query: {a: Math.random(), b: []}})
beforeRouteUpdate shoud fire once
What is actually happening?
this.$router.push({query: {a: Math.random(), b: []}})
beforeRouteUpdate fire twice
The text was updated successfully, but these errors were encountered: