Skip to content

Commit 251cb08

Browse files
authored
fix: cancelable runs can be zero
1 parent 2ff4213 commit 251cb08

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

action/lib/deduplicate.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export default async function ({ octokit, workflow_id, run_id, sha }) {
2727
.sort((a, b) => new Date(b.created_at) - new Date(a.created_at))
2828

2929
// there can only be one
30-
if (cancellable.length === 1) {
30+
if (cancellable.length <= 1) {
3131
core.info(`found no cancellable runs of workflow #${workflow_id}`)
3232
core.debug(inspect(cancellable.map(run => ({ id: run.id, name: run.name }))))
3333

0 commit comments

Comments
 (0)