From 9fab525092726f81b544d5f6bc4b3dfb5156fd54 Mon Sep 17 00:00:00 2001 From: Anton Martinovic Date: Sun, 4 Feb 2024 22:56:55 +0100 Subject: [PATCH] #175 Fixed a bug that caused an error when no pull request information were found linked in an issue. --- lib/core/provider/jira.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/core/provider/jira.ts b/lib/core/provider/jira.ts index 49fc4304..18b42f08 100644 --- a/lib/core/provider/jira.ts +++ b/lib/core/provider/jira.ts @@ -54,9 +54,9 @@ class Jira { log('getMergeRequests(%o)', issueId); return this.request('dev-status/latest/issue/summary?issueId=' + issueId).then((developmentInformation) => { - const pullrequests = developmentInformation.pullrequest; + const pullrequests = developmentInformation?.pullrequest; - if (pullrequests.overall.count !== 0) { + if (pullrequests && pullrequests.overall.count !== 0) { const promises: Promise[] = []; for (const [key, value] of Object.entries(pullrequests.byInstanceType)) {