Skip to content

Commit

Permalink
fix error in chart comp
Browse files Browse the repository at this point in the history
  • Loading branch information
Akash1000x committed Aug 9, 2024
1 parent 02fea86 commit 8b1c085
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apps/user-app/components/chart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ const ChartTooltipContent = React.forwardRef<
}

const [item] = payload;
const key = `${labelKey || item.dataKey || item.name || "value"}`;
const key = `${labelKey || item?.dataKey || item?.name || "value"}`;
const itemConfig = getPayloadConfigFromPayload(config, item, key);
const value =
!labelKey && typeof label === "string"
Expand Down

0 comments on commit 8b1c085

Please sign in to comment.