Skip to content

Commit

Permalink
fix(transitions): prevent unexpected errors on transition (#2988)
Browse files Browse the repository at this point in the history
  • Loading branch information
arnaudbesnier authored Oct 22, 2020
1 parent 1b9b7f1 commit 5becce1
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export function initialize(appInstance: ApplicationInstance): void {

function getTransitionInformation(transition: any, router: any) {
const fromRoute = transition?.from?.name;
const toRoute = transition ? transition.to.name : router.currentRouteName;
const toRoute = transition && transition.to ? transition.to.name : router.currentRouteName;
return {
fromRoute,
toRoute,
Expand Down

0 comments on commit 5becce1

Please sign in to comment.