1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-10-18 20:09:08 +02:00

Push errors onto state

This commit is contained in:
Jari Bakken 2014-10-24 10:59:40 +02:00 committed by Ivar Conradi Østhus
parent 702df49be8
commit f3efe6f629

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) {