mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-04 00:57:48 +00:00
Bump to v3.6.0.
This commit is contained in:
@@ -6,9 +6,8 @@ import support from '../support';
|
||||
var objectProto = Object.prototype;
|
||||
|
||||
/**
|
||||
* Used to resolve the `toStringTag` of values.
|
||||
* See the [ES spec](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.prototype.tostring)
|
||||
* for more details.
|
||||
* Used to resolve the [`toStringTag`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.prototype.tostring)
|
||||
* of values.
|
||||
*/
|
||||
var objToString = objectProto.toString;
|
||||
|
||||
@@ -29,13 +28,13 @@ var objToString = objectProto.toString;
|
||||
* // => false
|
||||
*/
|
||||
function isElement(value) {
|
||||
return (value && value.nodeType === 1 && isObjectLike(value) &&
|
||||
(objToString.call(value).indexOf('Element') > -1)) || false;
|
||||
return !!value && value.nodeType === 1 && isObjectLike(value) &&
|
||||
(objToString.call(value).indexOf('Element') > -1);
|
||||
}
|
||||
// Fallback for environments without DOM support.
|
||||
if (!support.dom) {
|
||||
isElement = function(value) {
|
||||
return (value && value.nodeType === 1 && isObjectLike(value) && !isPlainObject(value)) || false;
|
||||
return !!value && value.nodeType === 1 && isObjectLike(value) && !isPlainObject(value);
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user