Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

filter doesn't work when methods are added to Object.prototype #9984

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/ng/filter/filter.js
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ function filterFilter() {
// jshint +W086
for (var key in expression) {
(function(path) {
if (typeof expression[path] === 'undefined') return;
if (typeof expression[path] === 'undefined' || !expression.hasOwnProperty(path)) return;
predicates.push(function(value) {
return search(path == '$' ? value : (value && value[path]), expression[path]);
});
Expand Down