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

Ignore children with clashing keys #1364

Merged
merged 1 commit into from
Apr 9, 2014

Conversation

sophiebits
Copy link
Collaborator

Fixes #566.

@sophiebits
Copy link
Collaborator Author

cc @cpojer

@cpojer
Copy link
Contributor

cpojer commented Apr 7, 2014

niiiice

'flattenChildren(...): Encountered two children with the same key, `%s`. ' +
'Children keys must be unique.',
'Children keys should be unique; all children after the first with a ' +
'given key will be ignored.',
Copy link
Contributor

Choose a reason for hiding this comment

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

Perhaps a bit anal; to me it's not super obvious if it refers to all children, after the given key or or all subsequent children with the given key. Could perhaps benefit from a rewording, "Child keys must be unique; only the first child for each conflicting key is rendered, the rest are ignored.", must to emphasize that you should not rely on it as a feature (which seems like a bad thing)... or something along those lines perhaps?

PS. Children keys is not gramatically correct I think? Child keys sounds better to me, but I'm not 100% sure.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good points, fixed.

@zpao
Copy link
Member

zpao commented Apr 7, 2014

@sebmarkbage

@sebmarkbage
Copy link
Collaborator

Like

zpao added a commit that referenced this pull request Apr 9, 2014
Ignore children with clashing keys
@zpao zpao merged commit bff6d50 into facebook:master Apr 9, 2014
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.

Just warn on clashing keys but proceed with render
5 participants