Fix "missing key in ul" React warning

This commit is contained in:
Alex Liebowitz 2016-10-22 05:50:55 -04:00 committed by Alex Work
parent 80302786e1
commit 8dd20edfcb

View file

@ -107,7 +107,7 @@ var App = React.createClass({
for (let key of Object.keys(error)) {
let val = typeof error[key] == 'string' ? error[key] : JSON.stringify(error[key]);
let label = this._error_key_labels[key];
errorInfoList.push(<li><strong>{label}</strong>: <code>{val}</code></li>);
errorInfoList.push(<li key={key}><strong>{label}</strong>: <code>{val}</code></li>);
}
this.setState({