diff --git a/src/lib/client_config.js b/src/lib/client_config.js index bd2af41ef..5260796b1 100644 --- a/src/lib/client_config.js +++ b/src/lib/client_config.js @@ -90,7 +90,7 @@ ClientConfig.prototype.prepareHosts = function (hosts) { var host; var i; - if (_.isArray(hosts)) { + if (!_.isArray(hosts)) { hosts = [hosts]; } @@ -138,6 +138,5 @@ ClientConfig.prototype.prepareHosts = function (hosts) { }; } } - return hosts; }; diff --git a/src/lib/loggers/StdIo.js b/src/lib/loggers/StdIo.js index eccb15fe3..ee092d7c7 100644 --- a/src/lib/loggers/StdIo.js +++ b/src/lib/loggers/StdIo.js @@ -105,7 +105,7 @@ Stdio.prototype.onTrace = _.handler(function (method, url, body, responseBody, r } message += '\n<- '; if (this.color) { - if (responseStatus === 200) { + if (responseStatus >= 200 && responseStatus < 300) { message += clc.green.bold(responseStatus); } else { message += clc.red.bold(responseStatus);