mirror of
https://github.com/flynx/colors.js.git
synced 2025-10-30 19:40:09 +00:00
Redo weak equality check so we can colorize null in safe mode (#257)
This commit is contained in:
parent
b63ef88e52
commit
aa012aab59
@ -105,7 +105,8 @@ function applyStyle() {
|
|||||||
var args = Array.prototype.slice.call(arguments);
|
var args = Array.prototype.slice.call(arguments);
|
||||||
|
|
||||||
var str = args.map(function(arg) {
|
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;
|
return arg;
|
||||||
} else {
|
} else {
|
||||||
return util.inspect(arg);
|
return util.inspect(arg);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user