Skip to content

Commit

Permalink
refactor: default breadcrumb in node doesn't exist
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisvxd committed Feb 24, 2025
1 parent 0b20236 commit bb6ec11
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/core/lib/use-breadcrumbs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,9 @@ export const useBreadcrumbs = (renderCount?: number) => {

const node = useNodeStore.getState().nodes[componentId];

const label =
config.components[node.data.type]?.label ?? node.data.type;
const label = node
? config.components[node.data.type]?.label ?? node.data.type
: "Component";

return {
label,
Expand Down

0 comments on commit bb6ec11

Please sign in to comment.