Skip to content

Commit

Permalink
fix(breadcrumbs): support computed overrides (#331)
Browse files Browse the repository at this point in the history
  • Loading branch information
thorge authored Oct 16, 2024
1 parent df2b268 commit 79e4d63
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/runtime/nuxt/composables/useBreadcrumbItems.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export interface BreadcrumbProps {
/**
* Override any of the breadcrumb items based on the index.
*/
overrides?: (BreadcrumbItemProps | false | undefined)[]
overrides?: MaybeRefOrGetter<(BreadcrumbItemProps | false | undefined)[]>
/**
* Should the schema.org breadcrumb be generated.
* @default true
Expand Down Expand Up @@ -127,7 +127,7 @@ export function useBreadcrumbItems(options: BreadcrumbProps = {}) {
}
const current = withoutQuery(withoutTrailingSlash(toValue(options.path || router.currentRoute.value?.path) || rootNode))
// apply overrides
const overrides = options.overrides || []
const overrides = toValue(options.overrides || []);
const segments = pathBreadcrumbSegments(current, rootNode)
.map((path, index) => {
let item = <BreadcrumbItemProps> {
Expand Down

0 comments on commit 79e4d63

Please sign in to comment.