Skip to content

Commit

Permalink
Use nullish coalescing operator.
Browse files Browse the repository at this point in the history
  • Loading branch information
reitermarkus committed Sep 15, 2020
1 parent 5fdc5bc commit c83d282
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ export async function isBranchProtected(octokit: Octokit, branchName: string): P

if (branch.protected === true && branch.protection.enabled === true) {
// Only auto-merge if there is at least one required status check.
const contexts = branch.protection.required_status_checks.contexts || []
const contexts = branch.protection.required_status_checks.contexts ?? []
return contexts.length >= 1
}

Expand Down

0 comments on commit c83d282

Please sign in to comment.