summaryrefslogtreecommitdiff
path: root/tools/eslint/node_modules/lodash/_baseConformsTo.js
diff options
context:
space:
mode:
Diffstat (limited to 'tools/eslint/node_modules/lodash/_baseConformsTo.js')
-rw-r--r--tools/eslint/node_modules/lodash/_baseConformsTo.js9
1 files changed, 4 insertions, 5 deletions
diff --git a/tools/eslint/node_modules/lodash/_baseConformsTo.js b/tools/eslint/node_modules/lodash/_baseConformsTo.js
index a72deda2d5..e449cb84bd 100644
--- a/tools/eslint/node_modules/lodash/_baseConformsTo.js
+++ b/tools/eslint/node_modules/lodash/_baseConformsTo.js
@@ -11,14 +11,13 @@ function baseConformsTo(object, source, props) {
if (object == null) {
return !length;
}
- var index = length;
- while (index--) {
- var key = props[index],
+ object = Object(object);
+ while (length--) {
+ var key = props[length],
predicate = source[key],
value = object[key];
- if ((value === undefined &&
- !(key in Object(object))) || !predicate(value)) {
+ if ((value === undefined && !(key in object)) || !predicate(value)) {
return false;
}
}