From 06dbebd16861a8fb926fd5caae665e478a648a0d Mon Sep 17 00:00:00 2001 From: Trent Mick Date: Tue, 18 Oct 2016 13:36:33 -0700 Subject: [PATCH] drop unnecessary check, because `typeof(null)` already is "object", excluded in the first guard --- lib/bunyan.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/bunyan.js b/lib/bunyan.js index 5442826..cf60fea 100644 --- a/lib/bunyan.js +++ b/lib/bunyan.js @@ -967,8 +967,8 @@ function mkLogEmitter(minLevel) { } else { msgArgs = Array.prototype.slice.call(args, 1); } - } else if (typeof (args[0]) !== 'object' && args[0] !== null || - Array.isArray(args[0])) { + } else if (typeof (args[0]) !== 'object' || + Array.isArray(args[0])) { // `log.(msg, ...)` fields = null; msgArgs = Array.prototype.slice.call(args);