From 4d88fa69630e61e4a2e00b3f61d368b50b2c40b3 Mon Sep 17 00:00:00 2001 From: Sam McAlilly Date: Fri, 3 Nov 2023 15:10:54 -0500 Subject: [PATCH] even more one liner --- .../static/js/components/maps/SelectAssetsMap.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/asset_dashboard/static/js/components/maps/SelectAssetsMap.js b/asset_dashboard/static/js/components/maps/SelectAssetsMap.js index 0778994..7354299 100644 --- a/asset_dashboard/static/js/components/maps/SelectAssetsMap.js +++ b/asset_dashboard/static/js/components/maps/SelectAssetsMap.js @@ -70,11 +70,7 @@ function SelectAssetsMap(props) { } function saveGeometries() { - let existingIDs = [] - - if (existingGeoms?.features) { - existingIDs = existingGeoms.features.map(geom => geom.properties.asset_id) - } + const existingIDs = existingGeoms?.features ? existingGeoms.features.map(geom => geom.properties.asset_id) : [] let data = geomsToSave['features'] .map(feature => {