Fix bug where tasks scheduled after a queue has been flushed won't be executed
MODIFY
addon/services/scheduler.js
addon/services/scheduler.js
@@ -21,7 +21,7 @@ class Queue {
reset() {
this.tasks = [];
- this.isActive = false;
+ this.isActive = true;
this.afterPaintDeferred = Ember.RSVP.defer();
this.afterPaintPromise = this.afterPaintDeferred.promise;
}
@@ -41,7 +41,7 @@ export default Ember.Service.extend({
scheduleWork(queueName, callback) {
const queue = this.queues[queueName];
- if (!queue.isActive) {
+ if (queue.isActive) {
const token = new Token();
queue.tasks.push(callback);
queue.tasks.push(token);

Fix bug where tasks scheduled after a queue has been flushed won't be executed