Redo weak equality check so we can colorize null in safe mode (#257)

This commit is contained in:
Vladimir Boretskyi 2019-09-23 02:04:21 +03:00 committed by David Hyde
parent b63ef88e52
commit aa012aab59

View File

@ -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);