fixed warning regarding no child keys

This commit is contained in:
Florian Scholdei
2019-09-23 14:14:08 +02:00
parent 194b7f50b4
commit b6f2304cab

View File

@@ -14,7 +14,7 @@ class ButtonAddons extends React.Component<Props> {
const childWrapper = []; const childWrapper = [];
React.Children.forEach(children, child => { React.Children.forEach(children, child => {
if (child) { if (child) {
childWrapper.push(<p className="control">{child}</p>); childWrapper.push(<p className="control" key={childWrapper.length}>{child}</p>);
} }
}); });