From 6e7dd94d036042ccea2b166f2c6951e894f9ed43 Mon Sep 17 00:00:00 2001 From: Thibaut Valentin Date: Mon, 20 Jan 2025 15:56:55 +0100 Subject: [PATCH] fix(club): NPE on features --- src/main/webapp/src/components/Club/LocationEditor.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/webapp/src/components/Club/LocationEditor.jsx b/src/main/webapp/src/components/Club/LocationEditor.jsx index a1e99d1..9369078 100644 --- a/src/main/webapp/src/components/Club/LocationEditor.jsx +++ b/src/main/webapp/src/components/Club/LocationEditor.jsx @@ -104,7 +104,7 @@ export function LocationEditorModal({modal, sendData}) { }, [location]); useEffect(() => { - if (data.features?.some((e) => e.properties.label === location)) { + if (data?.features?.some((e) => e.properties.label === location)) { data.features.forEach((d) => { if (d.properties.label === location) { const {lat, lng} = convertLambert93ToLatLng(d.properties.x, d.properties.y)