Skip to content

Commit

Permalink
Return empty feature collection if no filterIds are specified
Browse files Browse the repository at this point in the history
  • Loading branch information
wkramer committed Apr 12, 2024
1 parent 9541d35 commit df2cac1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/services/useFilterLocations/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,10 @@ export function useFilterLocations(

watchEffect(async () => {
const _filterdIds = toValue(filterIds)
if (_filterdIds.length === 0) return
if (_filterdIds.length === 0) {
geojson.value = emptyFeatureCollection
return
}
await loadLocations(_filterdIds)
})

Expand Down

0 comments on commit df2cac1

Please sign in to comment.