Skip to content

Commit

Permalink
fix reading pullrequest id of undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
sergeysova committed Jul 2, 2021
1 parent 6c7ec96 commit 8eeed84
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ async function linearLinkUpdate(issue: Issue, pr: PR) {
let targetId;
const attachments = await issue.attachments();
if (attachments) {
const found = attachments.nodes.find((attach) => attach.metadata.pullRequestId === pr.number);
const found = attachments.nodes.find((attach) => attach.metadata?.pullRequestId === pr.number);
if (found) {
targetId = found.id;
}
Expand Down

0 comments on commit 8eeed84

Please sign in to comment.