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] }