From d7ba8a217fe6392fc55173ca710b9479022dd4f5 Mon Sep 17 00:00:00 2001 From: Brian Stack Date: Wed, 30 Mar 2016 17:35:39 -0700 Subject: [PATCH] This might fix what's been breaking auth tests --- lib/client.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/client.js b/lib/client.js index 9890bfd..cd74f6e 100644 --- a/lib/client.js +++ b/lib/client.js @@ -322,7 +322,7 @@ exports.createClient = function(reference, name) { if (reportStats) { reportStats(true, 'http-' + res.status); } - if(res.headers['content-type'].indexOf('application/json') === -1 || !res.body){ + if(!_.includes(res.headers['content-type'], 'application/json') || !res.body) { debug("Empty response from server: call: %s, method: %s",entry.name,entry.method); return undefined; }