Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Steven <steven@ceriously.com>
  • Loading branch information
thomwiggers and styfle committed Feb 15, 2021
1 parent a0df8c6 commit 085d47c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.ts
Expand Up @@ -59,7 +59,7 @@ async function main() {

let cancel_before;
if (all_but_latest) {
cancel_before = new Date(data.workflow_runs.reduce((a, b) => a.created_at < b.created_at ? a.created_at : b.created_at));
cancel_before = new Date(data.workflow_runs.reduce((a, b) => Math.min(a.created_at, b.created_at);
} else {
cancel_before = new Date(current_run.created_at);
}
Expand Down

0 comments on commit 085d47c

Please sign in to comment.