vientos / vientos-app

vientos progressive web app
6 stars 4 forks source link

When adding a new place, reconsider filtering of places to save #72

Closed ralexrdz closed 6 years ago

ralexrdz commented 6 years ago
    let placesToSave = relevantPlaces.filter(placeToSave =>
      !this.places.find(pl =>
        pl._id === placeToSave._id || // HERE
        (placeToSave.googlePlaceId && pl.googlePlaceId === placeToSave.googlePlaceId) 
      )
    )
elf-pavlik commented 6 years ago

I think we need to keep in mind cases where we want to copy municipality or state to places (once someone selects it as location). Possibly that Object.assign() was related to that.