We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
useBreadcrumbItems
1 parent 6ca374b commit d389507Copy full SHA for d389507
src/runtime/nuxt/composables/useBreadcrumbItems.ts
@@ -149,7 +149,7 @@ export function useBreadcrumbItems(options: BreadcrumbProps = {}) {
149
segments.push(...options.append)
150
return (segments.filter(Boolean) as BreadcrumbItemProps[])
151
.map((item) => {
152
- const route = routes.find(r => withoutTrailingSlash(r.path) === withoutTrailingSlash(item.to))
+ const route = router.resolve(item.to)?.matched
153
const routeMeta = (route?.meta || {}) as RouteMeta & { title?: string, breadcrumbLabel: string }
154
const routeName = route ? String(route.name || route.path) : (item.to === '/' ? 'index' : 'unknown')
155
let [name] = routeName.split('___')
0 commit comments