From 40c47296a26c57609402538a3331967afd62d4d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20PASTOURET?= Date: Wed, 16 Oct 2024 08:56:47 +0200 Subject: [PATCH] =?UTF-8?q?Gestion=20"null"=20>=20liste=20des=20enfants=20?= =?UTF-8?q?=C3=A0=20charges=20(#4645)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: gestion valeur null enfants * Update src/router.ts Co-authored-by: Simon Hamery * fix: lint prettier --------- Co-authored-by: Simon Hamery --- src/router.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/router.ts b/src/router.ts index e7736c4af5..938921378d 100644 --- a/src/router.ts +++ b/src/router.ts @@ -358,7 +358,7 @@ router.beforeEach((to, from, next) => { if (current.includes(enfantPath)) { const id_enfant = current.split(enfantPath)[1].split("/")[0] - const hasStoreChild = store.situation.enfants.find( + const hasStoreChild = store.situation.enfants?.some( (enfant) => enfant.id === `enfant_${id_enfant}` )