Merge pull request #2320 from coreos-inc/FIX-inprog-error
fix(angular-poll-channel): wrap scope change in $timeout
This commit is contained in:
commit
048f932094
1 changed files with 4 additions and 3 deletions
7
static/js/services/angular-poll-channel.js
vendored
7
static/js/services/angular-poll-channel.js
vendored
|
@ -72,7 +72,8 @@ angular.module('quay').factory('AngularPollChannel',
|
||||||
|
|
||||||
var that = this;
|
var that = this;
|
||||||
this.working = true;
|
this.working = true;
|
||||||
this.scope_.$apply(function() {
|
|
||||||
|
$timeout(function() {
|
||||||
that.requester_(function(status) {
|
that.requester_(function(status) {
|
||||||
if (status) {
|
if (status) {
|
||||||
that.working = false;
|
that.working = false;
|
||||||
|
@ -82,7 +83,7 @@ angular.module('quay').factory('AngularPollChannel',
|
||||||
that.stop();
|
that.stop();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
}, 0);
|
||||||
};
|
};
|
||||||
|
|
||||||
_PollChannel.prototype.setupTimer_ = function() {
|
_PollChannel.prototype.setupTimer_ = function() {
|
||||||
|
@ -103,4 +104,4 @@ angular.module('quay').factory('AngularPollChannel',
|
||||||
};
|
};
|
||||||
|
|
||||||
return service;
|
return service;
|
||||||
}]);
|
}]);
|
||||||
|
|
Reference in a new issue