Skip to content

Commit

Permalink
provide an initial value for the reduction
Browse files Browse the repository at this point in the history
  • Loading branch information
BrianHicks committed Jun 20, 2023
1 parent 5a90ac1 commit a34093c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Projects.omnifocusjs/Resources/sort.js
Expand Up @@ -21,7 +21,7 @@ don't! Modify the .ts file and run `tsc` instead!
// on hold.
let allBlocked = this.project.flattenedTasks
.map((t) => t.taskStatus === Task.Status.Blocked)
.reduce((a, b) => a && b);
.reduce((a, b) => a && b, true);
if ((this.project.effectiveDeferDate &&
this.project.effectiveDeferDate > now) ||
allBlocked) {
Expand Down
4 changes: 2 additions & 2 deletions Projects.omnifocusjs/Resources/sort.ts
Expand Up @@ -32,7 +32,7 @@ don't! Modify the .ts file and run `tsc` instead!
// on hold.
let allBlocked = this.project.flattenedTasks
.map((t: Task) => t.taskStatus === Task.Status.Blocked)
.reduce((a, b) => a && b);
.reduce((a, b) => a && b, true);

if (
(this.project.effectiveDeferDate &&
Expand Down Expand Up @@ -163,7 +163,7 @@ don't! Modify the .ts file and run `tsc` instead!
}
previousProject = project;
}
} catch (err) {
} catch (err: unknown) {
console.error(err);
}
});
Expand Down

0 comments on commit a34093c

Please sign in to comment.