diff --git a/lib/util.js b/lib/util.js index 7f266a1..1b7ac30 100644 --- a/lib/util.js +++ b/lib/util.js @@ -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; } @@ -278,4 +278,4 @@ module.exports = (function () { return util; -})(); \ No newline at end of file +})();