From f8721f803b0f19d1d8cf9031690e193b75bb382c Mon Sep 17 00:00:00 2001 From: Cédric Bonhomme Date: Wed, 9 Nov 2016 00:04:28 +0100 Subject: Set the initial value of the reduce. --- src/web/js/components/RightPanel.react.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/web/js/components/RightPanel.react.js') diff --git a/src/web/js/components/RightPanel.react.js b/src/web/js/components/RightPanel.react.js index 06f871c0..60ef426e 100644 --- a/src/web/js/components/RightPanel.react.js +++ b/src/web/js/components/RightPanel.react.js @@ -78,9 +78,9 @@ var PanelMixin = { items.push(
); } } else if (field.type == 'list') { - items.push(
{this.props.obj[field.key].reduce(function(concatenatedTag, currentTag) { - return currentTag.concat(", ", concatenatedTag) - })}
) + items.push(
{this.props.obj[field.key].reduce(function(previousTag, currentTag) { + return currentTag.concat(", ", previousTag) + }, "")}
) } else if (field.type == 'link') { items.push(
-- cgit