Removing unnecessary closure
MODIFY
addon/services/scheduler.js
addon/services/scheduler.js
@@ -46,9 +46,7 @@ const Scheduler = Service.extend({
queue.flush();
this._afterNextPaint()
- .then(() => {
- queue.afterPaintDeferred.resolve();
- });
+ .then(queue.afterPaintDeferred.resolve);
},
_initQueues() {

MODIFY
addon/task-queue.js
addon/task-queue.js
@@ -17,10 +17,6 @@ export default class TaskQueue {
}
}
- size() {
- return this.tasks.length;
- }
-
flush() {
this.isActive = false;
@@ -32,6 +28,10 @@ export default class TaskQueue {
this.isActive = true;
}
+ size() {
+ return this.tasks.length;
+ }
+
reset() {
this.tasks = [];
this.isActive = true;

Removing unnecessary closure