Merge pull request #2320 from coreos-inc/FIX-inprog-error

fix(angular-poll-channel): wrap scope change in $timeout
This commit is contained in:
Erica 2017-01-30 17:00:35 -05:00 committed by GitHub
commit 048f932094

View file

@ -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;
}]); }]);