8000 fix(transitions): prevent unexpected errors on transition (#2988) · rchl/sentry-javascript@5becce1 · GitHub
[go: up one dir, main page]

Skip to content

Commit 5becce1

Browse files
fix(transitions): prevent unexpected errors on transition (getsentry#2988)
1 parent 1b9b7f1 commit 5becce1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/ember/addon/instance-initializers/sentry-performance.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export function initialize(appInstance: ApplicationInstance): void {
2222

2323
function getTransitionInformation(transition: any, router: any) {
2424
const fromRoute = transition?.from?.name;
25-
const toRoute = transition ? transition.to.name : router.currentRouteName;
25+
const toRoute = transition && transition.to ? transition.to.name : router.currentRouteName;
2626
return {
2727
fromRoute,
2828
toRoute,

0 commit comments

Comments
 (0)
0