it is difficult to write conditional logic with {}, sometimes I get errors like "This condition will always return 'false' since JavaScript compares objects by reference, not value." in typescript.
Either undefined or an empty FileList should be good.
Can we avoid the use of
{}
here? https://github.com/GovTechSG/sgds-govtech-react/blob/3969c380ef7714fea24b620e1b402f87f28af909/src/FileUpload/FileUpload.tsx#L12C25-L12C33it is difficult to write conditional logic with
{}
, sometimes I get errors like "This condition will always return 'false' since JavaScript compares objects by reference, not value." in typescript.Either
undefined
or an emptyFileList
should be good.Thank you.