mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-01-29 06:27:49 +00:00
Use nullish checks instead of coercing to booleans.
This commit is contained in:
@@ -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';
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user