From 0c7d1e516db88220d0132d1b3c9762402a0ce0e9 Mon Sep 17 00:00:00 2001 From: Maxime Quandalle Date: Fri, 8 Jan 2021 15:23:13 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Les=20objectifs=20peuvent=20ne?= =?UTF-8?q?=20pas=20=C3=AAtre=20d=C3=A9finis=20au=20chargement?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../source/components/utils/useSearchParamsSimulationSharing.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mon-entreprise/source/components/utils/useSearchParamsSimulationSharing.ts b/mon-entreprise/source/components/utils/useSearchParamsSimulationSharing.ts index 760d322e4..142cac921 100644 --- a/mon-entreprise/source/components/utils/useSearchParamsSimulationSharing.ts +++ b/mon-entreprise/source/components/utils/useSearchParamsSimulationSharing.ts @@ -75,7 +75,7 @@ export default function useSearchParamsSimulationSharing() { } const objectifsOfConfig = (config: Partial) => - (config.objectifs as Objectifs).flatMap((objectifOrSection) => { + (config.objectifs ?? ([] as Objectifs)).flatMap((objectifOrSection) => { if (typeof objectifOrSection === 'string') { return [objectifOrSection] }