mirror of
https://github.com/valitydev/wazuh-kibana-app.git
synced 2024-11-07 10:18:57 +00:00
Safer comparation between filters
This commit is contained in:
parent
a831ef7bbd
commit
30387577a6
@ -952,9 +952,15 @@ function discoverController(
|
||||
}
|
||||
const cleaned = [];
|
||||
for(const filter of implicitFilter){
|
||||
const tmp = queryFilter.getFilters().filter(item => item.meta.params.query === filter.meta.params.query &&
|
||||
item.meta.params.type === filter.meta.params.type &&
|
||||
item.meta.key === filter.meta.key );
|
||||
const tmp = queryFilter
|
||||
.getFilters()
|
||||
.filter(item =>
|
||||
item.meta && item.meta.params && item.meta.params.query &&
|
||||
filter.meta && filter.meta.params && filter.meta.params.query &&
|
||||
item.meta.params.query === filter.meta.params.query &&
|
||||
item.meta.params.type === filter.meta.params.type &&
|
||||
item.meta.key === filter.meta.key
|
||||
);
|
||||
if(!tmp.length) cleaned.push(filter);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user