Skip to content

Conversation

@TheRealJon
Copy link
Contributor

@TheRealJon TheRealJon commented Dec 2, 2020

Reasons for making this change

Fixed edge case in ArrayField component that would sometimes cause a runtime error. Fixes #2153

Checklist

  • I'm updating documentation
  • I'm adding or updating code
    • I've added and/or updated tests
    • I've updated docs if needed
  • I'm adding a new feature
    • I've updated the playground with an example use of the feature
TheRealJon added a commit to TheRealJon/console that referenced this pull request Dec 2, 2020
In some cases, an uncaught exception could be thrown from dynamically generated array form fields. This was happening when a nested array field had an explicitly set 'null' value. This is a workaround that adds a fallback value to object and array fields to prevent this runtime error. An issue and fix have also been opened upstream in the react-jsonschema-form repo. rjsf-team/react-jsonschema-form#2153 rjsf-team/react-jsonschema-form#2154
@TheRealJon TheRealJon changed the title Fix runtime error in ArrayField component Issue 2153: Fix uncaught exception in ArrayField component Dec 3, 2020
@epicfaace epicfaace self-assigned this Jan 29, 2021
@epicfaace epicfaace changed the base branch from master to 1.x January 29, 2021 20:00
@epicfaace epicfaace changed the base branch from 1.x to master January 29, 2021 20:01
@epicfaace epicfaace changed the title Issue 2153: Fix uncaught exception in ArrayField component Fix crashing when arrayfield has a formdata set to null Jan 29, 2021
@epicfaace epicfaace merged commit e0ec5ea into rjsf-team:master Jan 29, 2021
@glen-cheney
Copy link

👋 Thanks for the library and the fix! Would it be possible to make a new release with this fix?

@epicfaace
Copy link
Member

Sure thing.

@glen-cheney
Copy link

Thanks for your time @epicfaace ❤️

@TheRealJon TheRealJon deleted the issue-2135 branch January 27, 2022 15:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants