From 8fa23a94a08deda82968d2d5c8fd13282ca49d81 Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Sat, 10 Sep 2016 10:48:36 -0700 Subject: [PATCH] Use nullish checks instead of coercing to booleans. --- lodash.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lodash.js b/lodash.js index 03a0b6b8c..884fcd3e2 100644 --- a/lodash.js +++ b/lodash.js @@ -11271,7 +11271,7 @@ * // => false */ function isElement(value) { - return !!value && value.nodeType === 1 && isObjectLike(value) && !isPlainObject(value); + return value != null && value.nodeType === 1 && isObjectLike(value) && !isPlainObject(value); } /** @@ -11566,7 +11566,7 @@ */ function isObject(value) { var type = typeof value; - return !!value && (type == 'object' || type == 'function'); + return value != null && (type == 'object' || type == 'function'); } /** @@ -11594,7 +11594,7 @@ * // => false */ function isObjectLike(value) { - return !!value && typeof value == 'object'; + return value != null && typeof value == 'object'; } /**