Skip to content

Commit

Permalink
Closes #2212 - Ignoring both the source and target attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
simianhacker committed Dec 10, 2014
1 parent e47adef commit 2570759
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/kibana/components/filter_bar/lib/dedupFilters.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ define(function (require) {
return function (existing, filters) {
filters = _.filter(filters, function (item) {
return !_.find(existing, function (existingFilter) {
return _.isEqual(_.omit(existingFilter, excludedAttributes), item);
return _.isEqual(_.omit(existingFilter, excludedAttributes), _.omit(item, excludedAttributes));
});
});
return filters;
Expand Down
2 changes: 1 addition & 1 deletion test/unit/specs/components/filter_bar/dedupFilters.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ define(function (require) {
];
var filters = [
{ range: { bytes: { from: 1024, to: 2048 } } },
{ query: { match: { _term: { query: 'apache', type: 'phrase' } } } }
{ meta: { negate: false }, query: { match: { _term: { query: 'apache', type: 'phrase' } } } }
];
var results = dedupFilters(existing, filters);
expect(results).to.contain(filters[0]);
Expand Down

0 comments on commit 2570759

Please sign in to comment.