1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-12-28 00:06:53 +01:00

Push errors onto state

This commit is contained in:
Jari Bakken 2014-10-24 10:59:40 +02:00
parent a360894f89
commit d65c9854e4

View File

@ -84,7 +84,7 @@ var ErrorMessages = React.createClass({
}
var errorNodes = this.props.errors.map(function(e) {
return (<li>{e}</li>);
return (<li key={e}>{e}</li>);
});
return (
@ -118,7 +118,7 @@ var Unleash = React.createClass({
},
handleError: function (error) {
window.alert(error);
this.state.errors.push(error);
},
updateFeature: function (changeRequest) {
@ -138,7 +138,7 @@ var Unleash = React.createClass({
contentType: 'application/json',
data: JSON.stringify(changeRequest)
}).then(function() {
}, this.handleError.bind(this));
}, this.handleError);
},
createFeature: function (feature) {