diff --git a/packages/vue/src/router.ts b/packages/vue/src/router.ts index f2b781eb1d55..0ab49f497865 100644 --- a/packages/vue/src/router.ts +++ b/packages/vue/src/router.ts @@ -61,7 +61,7 @@ export function vueRouterInstrumentation(router: VueRouter): VueRouterInstrument if (startTransactionOnLocationChange && !isPageLoadNavigation) { startTransaction({ - name: to.name || to.matched[0].path || to.path, + name: to.name || (to.matched[0] && to.matched[0].path) || to.path, op: 'navigation', tags, data,