mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
making sure type is defined and has postFlightRequest function (#17809)
This commit is contained in:
parent
98f1220b79
commit
6068dcea82
1 changed files with 4 additions and 2 deletions
|
@ -109,8 +109,10 @@ const CourierRequestHandlerProvider = function (Private, courier, timefilter) {
|
|||
return _.cloneDeep(resp);
|
||||
}).then(async resp => {
|
||||
for (const agg of vis.getAggConfig()) {
|
||||
const nestedSearchSource = new SearchSource().inherits(requestSearchSource);
|
||||
resp = await agg.type.postFlightRequest(resp, vis.aggs, agg, nestedSearchSource);
|
||||
if (_.has(agg, 'type.postFlightRequest')) {
|
||||
const nestedSearchSource = new SearchSource().inherits(requestSearchSource);
|
||||
resp = await agg.type.postFlightRequest(resp, vis.aggs, agg, nestedSearchSource);
|
||||
}
|
||||
}
|
||||
|
||||
searchSource.finalResponse = resp;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue