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