Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ppisljar committed Mar 22, 2021
1 parent 3daaa59 commit 0fbb0ff
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/plugins/data/common/search/expressions/filters_to_ast.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@ import { ExpressionFunctionKibanaFilter } from './kibana_filter';

export const filtersToAst = (filters: Filter[] | Filter) => {
return (Array.isArray(filters) ? filters : [filters]).map((filter) => {
const { meta, $state, ...restOfFilter } = filter;
return buildExpression([
buildExpressionFunction<ExpressionFunctionKibanaFilter>('kibanaFilter', {
query: JSON.stringify(filter.query),
query: JSON.stringify(restOfFilter),
negate: filter.meta.negate,
}),
]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export const kibanaFilterFunction: ExpressionFunctionKibanaFilter = {
alias: '',
disabled: false,
},
query: JSON.parse(args.query),
...JSON.parse(args.query),
};
},
};

0 comments on commit 0fbb0ff

Please sign in to comment.