Skip to content

Commit

Permalink
fix: ignore deleted in filter counts
Browse files Browse the repository at this point in the history
  • Loading branch information
thisislawatts committed Jan 4, 2022
1 parent 6c023dc commit 746ef0f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/stores/Maps/maps.store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,11 @@ export class MapsStore extends ModuleStore {

private filterMapPinsByType(filters: Array<string>) {
// filter pins to include matched pin type or subtype
// excluding items which have been marked as deleted=true
const filteredMapPins = this.mapPins.filter(pin => {
return pin.subType
return !pin._deleted && (pin.subType
? filters.includes(pin.subType)
: filters.includes(pin.type)
: filters.includes(pin.type))
})
return filteredMapPins
}
Expand Down

0 comments on commit 746ef0f

Please sign in to comment.