diff --git a/src/hydra/dataProvider.ts b/src/hydra/dataProvider.ts index 55479610..bd62c792 100644 --- a/src/hydra/dataProvider.ts +++ b/src/hydra/dataProvider.ts @@ -351,10 +351,10 @@ function dataProvider( } }); let extraInformation: { hasFileField?: boolean } = {}; - if ('meta' in params) { + if ('meta' in defaultParams) { extraInformation = params.meta; } - const updateHttpMethod = extraInformation.hasFileField ? 'POST' : 'PUT'; + const updateHttpMethod = extraInformation?.hasFileField ? 'POST' : 'PUT'; switch (type) { case CREATE: