[FE: fix #2371] fix for when labels are null (#2462)

Categoricals can have nulls
This commit is contained in:
Ben MR
2021-10-05 12:17:34 -07:00
committed by GitHub
parent 3b091d888d
commit c81731d32c

View File

@@ -136,7 +136,7 @@ class CentroidLabels extends PureComponent {
// Mirror LSB middle truncation
let displayLabel = label;
if (displayLabel.length > categoryLabelDisplayStringLongLength) {
if (displayLabel?.length > categoryLabelDisplayStringLongLength) {
displayLabel = `${label.slice(
0,
categoryLabelDisplayStringLongLength / 2