When I try to reproduce your issue, the error you speak about doesn't occur.
If you want to check, here is the reproduction project test. Your issue might come from another part of your implementation. Could you reproduce your issue in a Stackblitz to let the community check it?
react-admin's stackblitz: https://stackblitz.com/github/marmelab/react-admin/tree/master/examples/simple