@bugsnag/vue-router-performance
Advanced tools
Comparing version
@@ -14,4 +14,5 @@ import { onSettle } from '@bugsnag/browser-performance'; | ||
this.router = router; | ||
const normalizedBasename = !basename || basename === '/' ? '' : basename; | ||
function resolveRoute(url) { | ||
return flattenRoutes(router.getRoutes()).find((fullRoutePath) => url.pathname.replace(basename !== null && basename !== void 0 ? basename : '', '').match(pathToRegexp(fullRoutePath))) || 'no-route-found'; | ||
return flattenRoutes(router.getRoutes()).find((fullRoutePath) => url.pathname.replace(normalizedBasename !== null && normalizedBasename !== void 0 ? normalizedBasename : '', '').match(pathToRegexp(fullRoutePath))) || 'no-route-found'; | ||
} | ||
@@ -18,0 +19,0 @@ this.resolveRoute = resolveRoute; |
{ | ||
"name": "@bugsnag/vue-router-performance", | ||
"version": "2.0.0", | ||
"version": "2.1.0", | ||
"description": "BugSnag performance monitoring for vue-router", | ||
@@ -22,6 +22,4 @@ "homepage": "https://www.bugsnag.com/", | ||
}, | ||
"dependencies": { | ||
"@bugsnag/browser-performance": "^2.0.0" | ||
}, | ||
"peerDependencies": { | ||
"@bugsnag/browser-performance": "^2.0.0", | ||
"path-to-regexp": "^1.8.0", | ||
@@ -36,3 +34,3 @@ "vue-router": "^4.2.4" | ||
], | ||
"gitHead": "13ce6d677a070b56aeab48a3e284c3c5a5b94d2c" | ||
"gitHead": "fe8c5d081446b8de576dae8f590c7c75313ec842" | ||
} |
Sorry, the diff of this file is not supported yet
5475
1.63%43
2.38%- Removed