Skip to content

Commit

Permalink
[fix] Add guard for null legend label (#2344)
Browse files Browse the repository at this point in the history
Signed-off-by: Ihor Dykhta <dikhta.igor@gmail.com>
Co-authored-by: Nick Rabinowitz <nrabinowitz@foursquare.com>
  • Loading branch information
igorDykhta and nrabinowitz authored Oct 2, 2023
1 parent b5405f5 commit cf9cf21
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/src/common/color-legend.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ export const LegendRow = ({label = '', displayLabel, color, idx}) => (
<g transform={`translate(0, ${idx * (ROW_H + GAP)})`}>
<rect width={RECT_W} height={ROW_H} style={{fill: color}} />
<text x={RECT_W + 8} y={ROW_H - 1}>
{displayLabel ? label.toString() : ''}
{displayLabel ? label?.toString() ?? 'N/A' : ''}
</text>
</g>
);

0 comments on commit cf9cf21

Please sign in to comment.