DEV Community

Discussion on: Reactive Map with Rails, Stimulus Reflex and Mapbox

Collapse
 
kermitklein profile image
Ali Erbay • Edited

showNewMarkers() {
const allMarkers = JSON.parse(this.wrapperTarget.dataset.markers)
const newMarkers = allMarkers
.filter((marker1) => !this.markers.some((marker2) => marker1.name == marker2.name))
this.showNewMarkers()
}

I think there is a problem with this.showNewMarkers() inside of this function, it is not the same with your latest github repo commit