Skip to content

Commit

Permalink
fix runtime error in hydra dataProvider
Browse files Browse the repository at this point in the history
  • Loading branch information
slax57 committed Apr 5, 2024
1 parent 4f03e4b commit 8e347fc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/hydra/dataProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 8e347fc

Please sign in to comment.