Skip to content

Commit bf32358

Browse files
authored
fix: Update Aggs.ts - don't convert strings to objects (#146)
1 parent 8e52919 commit bf32358

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/elasticDSL/Aggs/Aggs.ts

+1
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ export function convertAggsBlocks(blockList: GqlAggBlock[]): ElasticAggsT {
4848
}
4949

5050
export function convertAggsRules(rules: GqlAggRules): ElasticAggsRulesT {
51+
if (typeof rules === 'string') return rules;
5152
const result = {} as ElasticAggsRulesT;
5253
Object.keys(rules).forEach((key) => {
5354
if (key === 'aggs' && rules.aggs) {

0 commit comments

Comments
 (0)