diff --git a/app.territoiresentransitions.react/src/app/pages/collectivite/PlansActions/PlanAction/data/utils.ts b/app.territoiresentransitions.react/src/app/pages/collectivite/PlansActions/PlanAction/data/utils.ts index be96fa0ce3..3010b68cbf 100644 --- a/app.territoiresentransitions.react/src/app/pages/collectivite/PlansActions/PlanAction/data/utils.ts +++ b/app.territoiresentransitions.react/src/app/pages/collectivite/PlansActions/PlanAction/data/utils.ts @@ -85,7 +85,7 @@ export const planNodeFactory = ({ parentDepth, nom, }: PlanNodeFactory): PlanNode => { - const lowerId = axes.reduce((a, b) => (a.id! < b.id! ? a : b)).id; + const lowerId = axes?.reduce((a, b) => (a.id! < b.id! ? a : b), {id: 0}).id; const tempId = Math.min(0, lowerId || 0) - 1; return {