Closed RozbehSharahi closed 1 month ago
My first guess is that in the following code a check for object is not sufficient as null also is typeof object
Good catch! Reproduced, optional chaining fix it:
const findFile = (values: any[]): object | undefined =>
// ...
: typeof value === 'object' && value?.rawFile instanceof File,
);
The reason I decided to write this issue is, that after extending tryouts i realized that the issue does not happen on 3.4.6 and the error where it comes from useOnSubmit is a file that was recently introduced.
Mostly it is just common code moved to one place to make a hook, however this part needed refactoring to be children agnostic.
API Platform version(s) affected: 3.4.7
Description
I have a very basic setup of the admin running.
How to reproduce
Basically in version 3.4.7 you can try to empty any field of any entity and you should receive:
Possible Solution
I don't know.
My first guess is that in the following code a check for object is not sufficient as null also is typeof
object
Additional Context
I am not a react dev and also have very few experience with this tool. If this is not a bug but rather an issue of my setup and you can not reproduce it => i am sorry.
The reason I decided to write this issue is, that after extending tryouts i realized that the issue does not happen on 3.4.6 and the error where it comes from
useOnSubmit
is a file that was recently introduced.