fixed non-array host config
This commit is contained in:
@ -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;
|
||||
};
|
||||
|
||||
@ -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);
|
||||
|
||||
Reference in New Issue
Block a user