diff --git a/src/domain/hanke/edit/utils.ts b/src/domain/hanke/edit/utils.ts index 8597e1330..ff4dfd856 100644 --- a/src/domain/hanke/edit/utils.ts +++ b/src/domain/hanke/edit/utils.ts @@ -38,8 +38,10 @@ export const convertFormStateToHankeData = (hankeData: HankeDataFormState): Hank return { ...hankeData, [FORMFIELD.HANKEALUEET]: hankeData[FORMFIELD.HANKEALUEET]?.map((alue) => { + // eslint-disable-next-line + const { feature, ...hankeAlue } = alue; // exclude virtual field 'feature' from API call return { - ...alue, + ...hankeAlue, geometriat: { featureCollection: formatFeaturesToHankeGeoJSON(alue.feature ? [alue.feature] : []), },