diff --git a/src/components/tree/legend/item.js b/src/components/tree/legend/item.js index 3b0dd20e7..3bd50ce95 100644 --- a/src/components/tree/legend/item.js +++ b/src/components/tree/legend/item.js @@ -35,7 +35,7 @@ const LegendItem = ({ style={{fontSize: 12, fill: darkGrey, fontFamily: dataFont}} > {label} - {label.substring(0, legendMaxLength)} + {typeof label === 'string' ? label.substring(0, legendMaxLength) : label} );