From fc2e7a5b3277fc6d5520a93c154b4d5bf3cd7e25 Mon Sep 17 00:00:00 2001 From: marius-patrascu Date: Thu, 8 Jul 2021 10:37:40 +0300 Subject: [PATCH] fix npe Signed-off-by: Marius Patrascu --- happi-graph-legend.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/happi-graph-legend.js b/happi-graph-legend.js index 0a51784..547cfbe 100644 --- a/happi-graph-legend.js +++ b/happi-graph-legend.js @@ -66,8 +66,10 @@ class HappiGraphLegend extends PolymerElement { } this.legendData[group][n.label] = n.label; n.properties.map(p => { - let propertiesGroup = this.propertiesMap[p.groupName].group - this.legendData[propertiesGroup][p.groupName] = p.groupName; + if (this.propertiesMap[p.groupName]){ + let propertiesGroup = this.propertiesMap[p.groupName].group + this.legendData[propertiesGroup][p.groupName] = p.groupName; + } }); }); }