Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #1233 : Exclude File object from isObject detection #1234

Merged
merged 2 commits into from
Mar 27, 2019

Conversation

oterral
Copy link
Contributor

@oterral oterral commented Mar 26, 2019

Reasons for making this change

Fix #1233

@oterral
Copy link
Contributor Author

oterral commented Mar 26, 2019

@epicfaace

Copy link
Member

@epicfaace epicfaace left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Just a small change.

src/utils.js Outdated Show resolved Hide resolved
test/utils_test.js Outdated Show resolved Hide resolved
Copy link
Member

@epicfaace epicfaace left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you rename this one test?

Co-Authored-By: oterral <[email protected]>
Copy link
Member

@epicfaace epicfaace left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Since isObject is used in several other places in the code, too, I believe this PR fixes several other bugs that might not have even been reported yet. 🎉

@epicfaace epicfaace merged commit de79e37 into rjsf-team:master Mar 27, 2019
@oterral
Copy link
Contributor Author

oterral commented Mar 27, 2019

Thx @epicfaace

@davidb-e4s
Copy link

Since 1.4.0 I'm now getting this error when trying to create a form

ReferenceError: File is not defined at isObject (/srv/node_modules/react-jsonschema-form/lib/utils.js:325:24) at getDefaultFormState (/srv/node_modules/react-jsonschema-form/lib/utils.js:288:8) at Form.getStateFromProps (/srv/node_modules/react-jsonschema-form/lib/components/Form.js:157:53) at new Form (/srv/node_modules/react-jsonschema-form/lib/components/Form.js:129:25)

1.3.0 works fine

@epicfaace
Copy link
Member

@davidb-e4s thanks for noting that, looks like a browser compatibility issue. Can you make an issue with this and put down your browser version?

@glasserc
Copy link
Contributor

The issue in question is #1252.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

File object becomes a basic js object
4 participants