cleanup: Avoid unnecessary braces
Our coding style has always been to avoid braces when all blocks are single-lines. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/805
This commit is contained in:

committed by
Georges Basile Stavracas Neto

parent
69f63dc94f
commit
67ea424525
@ -112,13 +112,12 @@ var Batch = class extends Task {
|
||||
for (let i = 0; i < tasks.length; i++) {
|
||||
let task;
|
||||
|
||||
if (tasks[i] instanceof Task) {
|
||||
if (tasks[i] instanceof Task)
|
||||
task = tasks[i];
|
||||
} else if (typeof tasks[i] == 'function') {
|
||||
else if (typeof tasks[i] == 'function')
|
||||
task = new Task(scope, tasks[i]);
|
||||
} else {
|
||||
else
|
||||
throw new Error('Batch tasks must be functions or Task, Hold or Batch objects');
|
||||
}
|
||||
|
||||
this.tasks.push(task);
|
||||
}
|
||||
@ -129,9 +128,8 @@ var Batch = class extends Task {
|
||||
}
|
||||
|
||||
runTask() {
|
||||
if (!(this._currentTaskIndex in this.tasks)) {
|
||||
if (!(this._currentTaskIndex in this.tasks))
|
||||
return null;
|
||||
}
|
||||
|
||||
return this.tasks[this._currentTaskIndex].run();
|
||||
}
|
||||
@ -179,9 +177,8 @@ var ConcurrentBatch = class extends Batch {
|
||||
process() {
|
||||
let hold = this.runTask();
|
||||
|
||||
if (hold) {
|
||||
if (hold)
|
||||
this.hold.acquireUntilAfter(hold);
|
||||
}
|
||||
|
||||
// Regardless of the state of the just run task,
|
||||
// fire off the next one, so all the tasks can run
|
||||
|
Reference in New Issue
Block a user