Skip to content

Commit

Permalink
use cleaner one liner
Browse files Browse the repository at this point in the history
  • Loading branch information
smcalilly committed Nov 3, 2023
1 parent 6a05682 commit f06f233
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions asset_dashboard/static/js/components/maps/SelectAssetsMap.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,8 @@ function SelectAssetsMap(props) {
function saveGeometries() {
let existingIDs = []

if (existingGeoms && existingGeoms.features) {
existingGeoms.features.forEach(geom => {
existingIDs.push(geom.properties.asset_id)
})
if (existingGeoms?.features) {
existingIDs = existingGeoms.features.map(geom => geom.properties.asset_id)
}

let data = geomsToSave['features']
Expand Down

0 comments on commit f06f233

Please sign in to comment.