diff --git a/apps/user-app/components/chart.tsx b/apps/user-app/components/chart.tsx index b038900..d60bd37 100644 --- a/apps/user-app/components/chart.tsx +++ b/apps/user-app/components/chart.tsx @@ -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"