Skip to content

Commit

Permalink
Rename concatChildren() argument from childrens to childrenArguments (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
maurobringolf authored and youknowriad committed Jun 20, 2017
1 parent cab8713 commit d80189e
Showing 1 changed file with 4 additions and 5 deletions.
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
*/
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 );
} );
}

0 comments on commit d80189e

Please sign in to comment.