Skip to content

Commit aa012aa

Browse files
givehugDABH
authored andcommitted
Redo weak equality check so we can colorize null in safe mode (#257)
1 parent b63ef88 commit aa012aa

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/colors.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,8 @@ function applyStyle() {
105105
var args = Array.prototype.slice.call(arguments);
106106

107107
var str = args.map(function(arg) {
108-
if (arg !== undefined && arg.constructor === String) {
108+
// Use weak equality check so we can colorize null in safe mode
109+
if (arg != undefined && arg.constructor === String) {
109110
return arg;
110111
} else {
111112
return util.inspect(arg);

0 commit comments

Comments
 (0)