Skip to content

Commit

Permalink
fix(useBreadcrumbItems): nuxt instance in computed
Browse files Browse the repository at this point in the history
Relates to #310
  • Loading branch information
harlan-zw committed Sep 5, 2024
1 parent 19c27d3 commit c1696ea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/runtime/nuxt/composables/useBreadcrumbItems.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ export function useBreadcrumbItems(options: BreadcrumbProps = {}) {
if (i18n.strategy === 'prefix' || (i18n.strategy !== 'no_prefix' && toValue(i18n.defaultLocale) !== toValue(i18n.locale)))
rootNode = `/${toValue(i18n.locale)}`
}
const current = withoutQuery(withoutTrailingSlash(toValue(options.path || useRoute().path) || rootNode))
const current = withoutQuery(withoutTrailingSlash(toValue(options.path || router.currentRoute.value?.path) || rootNode))
// apply overrides
const overrides = options.overrides || []
const segments = pathBreadcrumbSegments(current, rootNode)
Expand Down

0 comments on commit c1696ea

Please sign in to comment.