Skip to content

Commit

Permalink
Update src/plugins/data/common/search/aggs/buckets/histogram.ts
Browse files Browse the repository at this point in the history
Co-authored-by: Luke Elmers <[email protected]>
  • Loading branch information
alexwizp and lukeelmers authored Sep 1, 2020
1 parent 4b2ae64 commit 6101aa3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/plugins/data/common/search/aggs/buckets/histogram.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,8 @@ export const getHistogramBucketAgg = ({
return childSearchSource
.fetch(options)
.then((resp: any) => {
const min = get(resp, 'aggregations.minAgg.value', 0);
const max = get(resp, 'aggregations.maxAgg.value', 0);
const min = resp.aggregations?.minAgg?.value ?? 0;
const max = resp.aggregations?.maxAgg?.value ?? 0;

aggConfig.setAutoBounds({
min,
Expand Down

0 comments on commit 6101aa3

Please sign in to comment.