mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
Update src/plugins/data/common/es_query/kuery/node_types/node_builder.ts
Co-authored-by: Lukas Olson <olson.lukas@gmail.com>
This commit is contained in:
parent
d2064bbc24
commit
4b7e781fe6
1 changed files with 4 additions and 6 deletions
|
@ -27,12 +27,10 @@ export const nodeBuilder = {
|
|||
nodeTypes.literal.buildNode(false),
|
||||
]);
|
||||
},
|
||||
or: ([first, ...args]: KueryNode[]): KueryNode => {
|
||||
return args.length ? nodeTypes.function.buildNode('or', [first, nodeBuilder.or(args)]) : first;
|
||||
or: (args: KueryNode[]): KueryNode => {
|
||||
return nodeTypes.function.buildNode('or', args);
|
||||
},
|
||||
and: ([first, ...args]: KueryNode[]): KueryNode => {
|
||||
return args.length
|
||||
? nodeTypes.function.buildNode('and', [first, nodeBuilder.and(args)])
|
||||
: first;
|
||||
and: (args: KueryNode[]): KueryNode => {
|
||||
return nodeTypes.function.buildNode('and', args);
|
||||
},
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue