Don't set busy state at all for background request

pull/21833/head
David Baker 2017-03-22 10:53:15 +00:00
parent ec63e18b42
commit e5a5ca9efc
1 changed files with 10 additions and 6 deletions

View File

@ -141,16 +141,20 @@ export default React.createClass({
}, },
_requestCallback: function(auth, background) { _requestCallback: function(auth, background) {
// only set the busy flag if this is a non-background request
if (!background) {
this.setState({ this.setState({
busy: !background, busy: true,
errorText: null, errorText: null,
stageErrorText: null, stageErrorText: null,
}); });
}
return this.props.makeRequest(auth).finally(() => { return this.props.makeRequest(auth).finally(() => {
if (this._unmounted) { if (this._unmounted) {
return; return;
} }
if (background) { // only unset the busy flag if this is a non-background request
if (!background) {
this.setState({ this.setState({
busy: false, busy: false,
}); });