diff --git a/src/router.ts b/src/router.ts index 95a18e8f98..17eaeb5ddb 100644 --- a/src/router.ts +++ b/src/router.ts @@ -359,7 +359,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}` )