From 5b3d579f87dabcd0516d5891e768dc094c686433 Mon Sep 17 00:00:00 2001 From: orangemug Date: Wed, 29 Jan 2020 08:44:27 +0000 Subject: [PATCH] Fix to fallback to index for unique feature key in --- src/components/map/FeaturePropertyPopup.jsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/map/FeaturePropertyPopup.jsx b/src/components/map/FeaturePropertyPopup.jsx index 71b99830..8b7816ae 100644 --- a/src/components/map/FeaturePropertyPopup.jsx +++ b/src/components/map/FeaturePropertyPopup.jsx @@ -21,8 +21,9 @@ function renderProperties(feature) { }) } -function renderFeature(feature) { - return
+function renderFeature(feature, idx) { + const uniqueKey = feature.hasOwnProperty('id') ? feature.id : idx; + return
{feature.layer['source-layer']}{feature.inspectModeCounter && × {feature.inspectModeCounter}}