diff --git a/lib/colors.js b/lib/colors.js index 7ca90fa..0c1089f 100644 --- a/lib/colors.js +++ b/lib/colors.js @@ -105,7 +105,8 @@ function applyStyle() { var args = Array.prototype.slice.call(arguments); var str = args.map(function(arg) { - if (arg !== undefined && arg.constructor === String) { + // Use weak equality check so we can colorize null in safe mode + if (arg != undefined && arg.constructor === String) { return arg; } else { return util.inspect(arg);