Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixes #838 -- use hasOwnProperty when looping through _.where attrs, …

…for healthy paranoia's sake
  • Loading branch information...
commit c42a3e6772f36ee3b6372ce5b0b98c9fbdda158a 1 parent 187bc1d
@jashkenas authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  underscore.js
View
2  underscore.js
@@ -239,7 +239,7 @@
if (_.isEmpty(attrs)) return [];
return _.filter(obj, function(value) {
for (var key in attrs) {
- if (attrs[key] !== value[key]) return false;
+ if (_.has(attrs, key) && attrs[key] !== value[key]) return false;
}
return true;
});
Please sign in to comment.
Something went wrong with that request. Please try again.