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

Rename concatChildren() argument from childrens to childrenArguments #1232

Merged
merged 2 commits into from
Jun 20, 2017
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions element/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,11 @@ export function renderToString( element ) {
/**
* Concatenate two or more React children objects
*
* @param {...?Object} childrens Set of children to concatenate
* @return {Array} The concatenated value
* @param {...?Object} childrenArguments Array of children arguments (array of arrays/strings/objects) to concatenate
* @return {Array} The concatenated value
Copy link
Contributor

Choose a reason for hiding this comment

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

I diff the diff here should be spaces and not tabs, that way the text would be aligned?

*/
export function concatChildren( ...childrens ) {
return childrens.reduce( ( memo, children, i ) => {
export function concatChildren( ...childrenArguments ) {
return childrenArguments.reduce( ( memo, children, i ) => {
Children.forEach( children, ( child, j ) => {
if ( child && 'string' !== typeof child ) {
child = cloneElement( child, {
Expand Down Expand Up @@ -117,4 +117,3 @@ export function switchChildrenNodeName( children, nodeName ) {
return createElement( nodeName, { key: index, ...props }, childrenProp );
} );
}