mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 01:13:23 -04:00
This commit is contained in:
parent
4f2b0fb518
commit
3c646eb842
1 changed files with 3 additions and 1 deletions
|
@ -5,10 +5,12 @@ export function AggResponseBucketsProvider() {
|
|||
function Buckets(aggResp, aggParams) {
|
||||
if (_.has(aggResp, 'buckets')) {
|
||||
this.buckets = aggResp.buckets;
|
||||
} else {
|
||||
} else if (aggResp) {
|
||||
// Some Bucket Aggs only return a single bucket (like filter).
|
||||
// In those instances, the aggResp is the content of the single bucket.
|
||||
this.buckets = [aggResp];
|
||||
} else {
|
||||
this.buckets = [];
|
||||
}
|
||||
|
||||
this.objectMode = _.isPlainObject(this.buckets);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue