fix: replace return null with empty tags

This commit is contained in:
2025-09-02 22:35:36 +02:00
parent ab0c5e3e99
commit 0689a5827f
9 changed files with 22 additions and 22 deletions

View File

@@ -73,7 +73,7 @@ const ChartStyle = ({ id, config }: { id: string; config: ChartConfig }) => {
)
if (!colorConfig.length) {
return null
return <></>;
}
return (
@@ -135,7 +135,7 @@ const ChartTooltipContent = React.forwardRef<
const tooltipLabel = React.useMemo(() => {
if (hideLabel || !payload?.length) {
return null
return <></>;
}
const [item] = payload
@@ -155,7 +155,7 @@ const ChartTooltipContent = React.forwardRef<
}
if (!value) {
return null
return <></>;
}
return <div className={cn("font-medium", labelClassName)}>{value}</div>
@@ -170,7 +170,7 @@ const ChartTooltipContent = React.forwardRef<
])
if (!active || !payload?.length) {
return null
return <></>;
}
const nestLabel = payload.length === 1 && indicator !== "dot"
@@ -273,7 +273,7 @@ const ChartLegendContent = React.forwardRef<
const { config } = useChart()
if (!payload?.length) {
return null
return <></>;
}
return (