diff --git a/src/app/components/leaflet-map/leaflet-map.component.ts b/src/app/components/leaflet-map/leaflet-map.component.ts index 5c5f8b8..f6610bf 100644 --- a/src/app/components/leaflet-map/leaflet-map.component.ts +++ b/src/app/components/leaflet-map/leaflet-map.component.ts @@ -310,6 +310,12 @@ export class LeafletMapComponent implements OnInit { public loadPins(): void { this.pinsService.getPins().subscribe((pins: Pin[]) => { + // Supprimer du body toutes les divs confirm-modal-* / share-modal-* / edit-pin-popup-* + const modals = document.querySelectorAll('div[id^="confirm-modal-"], div[id^="share-modal-"], div[id^="edit-pin-popup-"]'); + modals.forEach((modal) => { + modal.remove(); + }); + this.allPins = pins; this.extractPersons(pins); this.renderPins(); // Afficher d'abord les pins sans les filtres