Skip to content

Commit

Permalink
fix: Update Aggs.ts - don't convert strings to objects (#146)
Browse files Browse the repository at this point in the history
  • Loading branch information
amran99 authored Sep 30, 2022
1 parent 8e52919 commit bf32358
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/elasticDSL/Aggs/Aggs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ export function convertAggsBlocks(blockList: GqlAggBlock[]): ElasticAggsT {
}

export function convertAggsRules(rules: GqlAggRules): ElasticAggsRulesT {
if (typeof rules === 'string') return rules;
const result = {} as ElasticAggsRulesT;
Object.keys(rules).forEach((key) => {
if (key === 'aggs' && rules.aggs) {
Expand Down

0 comments on commit bf32358

Please sign in to comment.