Skip to content

Commit

Permalink
attempting to resolve bug when contentType variable is undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
kazajhodo committed Apr 24, 2016
1 parent 77a4c8c commit 853096a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ module.exports = (function () {
});

response.on('end', function () {
if (contentType.indexOf('application/json') === -1) {
if (contentType != 'undefined' && contentType.indexOf('application/json') === -1) {
callback(response.statusCode + ' API failed to return JSON content', null);
return;
}
Expand Down Expand Up @@ -278,4 +278,4 @@ module.exports = (function () {

return util;

})();
})();

0 comments on commit 853096a

Please sign in to comment.