Skip to content

Commit 613ad7f

Browse files
committed
Merge pull request #24 from AlexCline/fix-undefined-body-in-find-issue
Added a check for when the body variable is undefined.
2 parents 94b8dd7 + 88e792b commit 613ad7f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/jira.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,10 @@ var JiraApi = exports.JiraApi = function(protocol, host, port, username, passwor
184184
return;
185185
}
186186

187+
if (body === undefined) {
188+
callback('Response body was undefined.');
189+
}
190+
187191
callback(null, JSON.parse(body));
188192

189193
});

0 commit comments

Comments
 (0)