Skip to content

Commit

Permalink
Redo weak equality check so we can colorize null in safe mode (#257)
Browse files Browse the repository at this point in the history
  • Loading branch information
givehug authored and DABH committed Sep 22, 2019
1 parent b63ef88 commit aa012aa
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/colors.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit aa012aa

Please sign in to comment.