diff --git a/apps/edr-freight-web/backoffice/src/pages/fleet/RoutesPage.tsx b/apps/edr-freight-web/backoffice/src/pages/fleet/RoutesPage.tsx index 7d530697f..30acf50ba 100644 --- a/apps/edr-freight-web/backoffice/src/pages/fleet/RoutesPage.tsx +++ b/apps/edr-freight-web/backoffice/src/pages/fleet/RoutesPage.tsx @@ -408,7 +408,13 @@ export default function RoutesPage() { setForm((current) => ({ ...current, name: e.currentTarget.value }))} + onChange={(e) => { + // Capture the value before the state updater runs — React may + // recycle the synthetic event, nulling currentTarget by the time + // the updater executes ("Cannot read properties of null"). + const name = e.currentTarget.value; + setForm((current) => ({ ...current, name })); + }} />