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: deal with edage case in errorPropertyToPath #397

Merged
merged 3 commits into from
Nov 16, 2016
Merged

fix: deal with edage case in errorPropertyToPath #397

merged 3 commits into from
Nov 16, 2016

Conversation

Chun-Yang
Copy link

@Chun-Yang Chun-Yang commented Nov 16, 2016

Reasons for making this change

When there is '.' in side a key of an object, the errorPropertyToPath function failed to parse the string into a path array.

Checklist

  • I'm adding or updating code
    • I've added and/or updated tests

Copy link
Collaborator

@n1k0 n1k0 left a comment

Choose a reason for hiding this comment

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

As commented I'd rather prefer importing the appropriate lodash function instead of landing and maintaining its code here.

PS: thanks!

}
return path;
}, []);
// copied from lodash https://github.com/lodash/lodash/blob/4.17.1/lodash.js#L6744
Copy link
Collaborator

Choose a reason for hiding this comment

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

Seems like we could use https://lodash.com/docs/4.17.2#toPath directly. I think lodash allows importing functions atomically, so this shouldn't bloat the build too much.

Copy link
Author

Choose a reason for hiding this comment

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

👍

Copy link
Collaborator

@n1k0 n1k0 left a comment

Choose a reason for hiding this comment

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

Great!

@n1k0 n1k0 merged commit b429bdd into rjsf-team:master Nov 16, 2016
@n1k0
Copy link
Collaborator

n1k0 commented Nov 16, 2016

Thanks for contributing 👍

n1k0 added a commit that referenced this pull request Nov 25, 2016
* Update dependencies to their latest versions. (#386)
* Fix #385: Avoid dynamic requires. (#387)
* Fix #365: Tab stop for Add button + (#392)
* Add a single field form example in the playground (#390)
* Allow using field names containing a dot character (#397)
* Updated eslint config.
* Improve checkbox and radio button styles (#403)
* Add missing proptype for disabled (#416)
* Temporary fix for #349 and facebook/react#7630 radio widget bug (#423)
@n1k0
Copy link
Collaborator

n1k0 commented Nov 25, 2016

Released along v0.41.2.

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

Successfully merging this pull request may close these issues.

2 participants