From a37503aa8a6442085e553138ffb5cabf56b88722 Mon Sep 17 00:00:00 2001 From: Mauro Bringolf Date: Sat, 17 Jun 2017 20:32:52 +0200 Subject: [PATCH 1/2] Rename concatChildren argument from childrens to childrenArguments --- element/index.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/element/index.js b/element/index.js index 2fb9792f3d0b90..877a5192f808c0 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 ); } ); } - From 00494f0d64a8f956735ef7068b3bfbe2717bebaa Mon Sep 17 00:00:00 2001 From: Mauro Bringolf Date: Tue, 20 Jun 2017 11:53:19 +0200 Subject: [PATCH 2/2] Fix indentation for parameter comment alignment --- element/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/element/index.js b/element/index.js index 877a5192f808c0..ef740e976dd35c 100644 --- a/element/index.js +++ b/element/index.js @@ -83,7 +83,7 @@ export function renderToString( element ) { * Concatenate two or more React children objects * * @param {...?Object} childrenArguments Array of children arguments (array of arrays/strings/objects) to concatenate - * @return {Array} The concatenated value + * @return {Array} The concatenated value */ export function concatChildren( ...childrenArguments ) { return childrenArguments.reduce( ( memo, children, i ) => {