Elastic: Fix error "e.buckets[Symbol.iterator] is not a function" when using filter (#26217)
* Add bucket to array if it is not in array * Fix issue one level above * Rename variable * Move array check to processAggregationDocs
This commit is contained in:
1 parent
d28d495235
commit
6d8545da63
1 file changed
+2
-2
@@ -135,8 +135,8 @@ export class ElasticResponse {
|
||||
table.addColumn({ text: metricName });
|
||||
values.push(value);
|
||||
};
|
||||
|
||||
for (const bucket of esAgg.buckets) {
|
||||
const buckets = _.isArray(esAgg.buckets) ? esAgg.buckets : [esAgg.buckets];
|
||||
for (const bucket of buckets) {
|
||||
const values = [];
|
||||
|
||||
for (const propValues of _.values(props)) {
|
||||
|
||||
Reference in new issue
Block a user