mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-01 15:57:48 +00:00
Move isObjectLike condition up in _.isEmpty.
This commit is contained in:
10
lodash.js
10
lodash.js
@@ -10399,17 +10399,17 @@
|
||||
isArguments(value) || isBuffer(value))) {
|
||||
return !value.length;
|
||||
}
|
||||
for (var key in value) {
|
||||
if (hasOwnProperty.call(value, key)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if (isObjectLike(value)) {
|
||||
var tag = getTag(value);
|
||||
if (tag == mapTag || tag == setTag) {
|
||||
return !value.size;
|
||||
}
|
||||
}
|
||||
for (var key in value) {
|
||||
if (hasOwnProperty.call(value, key)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user