replace ternary with if/else

This commit is contained in:
DABH 2018-05-04 18:18:27 -07:00
parent 32906a23ad
commit 7f146faff3

View File

@ -105,7 +105,11 @@ function applyStyle() {
var args = Array.prototype.slice.call(arguments); var args = Array.prototype.slice.call(arguments);
var str = args.map(function(arg) { var str = args.map(function(arg) {
return arg.constructor === String ? arg : util.inspect(arg); if (arg.constructor === String) {
return arg;
} else {
return util.inspect(arg);
}
}).join(' '); }).join(' ');
if (!colors.enabled || !str) { if (!colors.enabled || !str) {