From d80189e0c958fdd07e119572f9caf11ebd47de28 Mon Sep 17 00:00:00 2001 From: Mauro Bringolf Date: Tue, 20 Jun 2017 12:07:19 +0200 Subject: [PATCH] Rename concatChildren() argument from childrens to childrenArguments (#1232) --- element/index.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/element/index.js b/element/index.js index 2fb9792f3d0b9..ef740e976dd35 100644 --- a/element/index.js +++ b/element/index.js @@ -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, { @@ -117,4 +117,3 @@ export function switchChildrenNodeName( children, nodeName ) { return createElement( nodeName, { key: index, ...props }, childrenProp ); } ); } -