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:
parent
a360894f89
commit
d65c9854e4
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user