Update `validateJson` Function To Check For File Structure
Opened this issue · 0 comments
TimothyWillard commented
Right now validateJson
(which was previously validateFile
inside the FileUploader
component) just
console.log`s a snippet and returns true. This leads to a vague error like:
TypeError: Cannot read properties of undefined (reading 'map')
whenever the user uploads an improperly formatted JSON file. In fact the entire beforeUpload
hook in the FileUploader
component could use another pass with an eye for not crashing the app whenever a bad input is uploaded.