Closed
Description
Version
3.1.3
Reproduction link
https://codesandbox.io/s/vue-router-undefined-error-7ltnr
Steps to reproduce
- Create route "/" and "/B"
- Redirect to "/" inside "beforeEnter" in /"B" using
next('/')
- Push "/B" from "/"
What is expected?
To have a proper error object thrown
What is actually happening?
Undefined object thrown Uncaught (in promise) undefined
This only happens when using this.$router.push
. The behaviour is not present using router-link
.
Even though, I'd be great to always have proper errors. I suspect this is the line of code involved https://github.com/vuejs/vue-router/blob/dev/src/history/base.js#L163
Metadata
Metadata
Assignees
Labels
No labels