I've got a click event for the main part of my leaflet map. But if the user clicks on a specific layer I want to do something else and not the other action. I thought I could stop the propagation of the map click using this answer
map.originalEvent.preventDefault()
But I still get both events.
Here's a cutting from my code
    this.map.on('click', (event) => {
        console.log('map clicked')
    })
    this.boundaryLayer = L.geoJSON().addTo(this.map);
    this.boundaryLayer.on('click', (event) => {
        console.log('boundary clicked', event);
        event.originalEvent.preventDefault();
    });
