diff --git a/lib/platform/bitbucket-server/index.js b/lib/platform/bitbucket-server/index.js
index <HASH>..<HASH> 100644
--- a/lib/platform/bitbucket-server/index.js
+++ b/lib/platform/bitbucket-server/index.js
@@ -257,11 +257,13 @@ async function deleteBranch(branchName, closePr = false) {
   if (closePr) {
     // getBranchPr
     const pr = await getBranchPr(branchName);
-    await api.post(
-      `/rest/api/1.0/projects/${config.projectKey}/repos/${
-        config.repositorySlug
-      }/pull-requests/${pr.number}/decline?version=${pr.version + 1}`
-    );
+    if (pr) {
+      await api.post(
+        `/rest/api/1.0/projects/${config.projectKey}/repos/${
+          config.repositorySlug
+        }/pull-requests/${pr.number}/decline?version=${pr.version + 1}`
+      );
+    }
   }
   return config.storage.deleteBranch(branchName);
 }
fix(bitbucket-server): pr check after deleting branch

Closes #<I>