arg is a String object not a string literal (fixes #226)

This commit is contained in:
DABH 2018-05-04 17:53:43 -07:00
parent ffeba270e8
commit 855e342c9e

View File

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