fixed non-array host config

This commit is contained in:
Spencer Alger
2013-10-23 08:07:52 -07:00
parent 01763c2c39
commit 7fef00d9ce
2 changed files with 2 additions and 3 deletions

View File

@ -90,7 +90,7 @@ ClientConfig.prototype.prepareHosts = function (hosts) {
var host; var host;
var i; var i;
if (_.isArray(hosts)) { if (!_.isArray(hosts)) {
hosts = [hosts]; hosts = [hosts];
} }
@ -138,6 +138,5 @@ ClientConfig.prototype.prepareHosts = function (hosts) {
}; };
} }
} }
return hosts; return hosts;
}; };

View File

@ -105,7 +105,7 @@ Stdio.prototype.onTrace = _.handler(function (method, url, body, responseBody, r
} }
message += '\n<- '; message += '\n<- ';
if (this.color) { if (this.color) {
if (responseStatus === 200) { if (responseStatus >= 200 && responseStatus < 300) {
message += clc.green.bold(responseStatus); message += clc.green.bold(responseStatus);
} else { } else {
message += clc.red.bold(responseStatus); message += clc.red.bold(responseStatus);