Fix _renderCommaSeparatedList

pull/21833/head
Luke Barnard 2017-01-25 11:28:12 +00:00
parent b887d5b823
commit f9ca2a8e59
1 changed files with 2 additions and 1 deletions

View File

@ -252,7 +252,8 @@ module.exports = React.createClass({
const other = " other" + (remaining > 1 ? "s" : ""); const other = " other" + (remaining > 1 ? "s" : "");
return items.join(', ') + ' and ' + remaining + other; return items.join(', ') + ' and ' + remaining + other;
} else { } else {
return items.join(', ') + ' and ' + items.pop(); const lastItem = items.pop();
return items.join(', ') + ' and ' + lastItem;
} }
}, },