We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ddb1709 commit 2efc7ccCopy full SHA for 2efc7cc
packages/ra-core/src/dataProvider/useCreate.ts
@@ -146,7 +146,7 @@ export const useCreate = <
146
mutationMode === 'pessimistic'
147
? result?.id
148
: params.data?.id;
149
- if (!id) {
+ if (id === undefined || id === null) {
150
throw new Error(
151
'Invalid dataProvider response for create: missing id'
152
);
0 commit comments