fixes error with postFlightRequest (#16643) (#16888)

This commit is contained in:
Peter Pisljar 2018-02-23 12:33:00 +01:00 committed by GitHub
parent 2971a8ab27
commit 26cf278e2d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -46,7 +46,7 @@ const CourierRequestHandlerProvider = function (Private, courier, timefilter) {
resolve(_.cloneDeep(searchSource.rawResponse));
}
}).then(async resp => {
for (const agg of vis.aggs) {
for (const agg of vis.getAggConfig()) {
const nestedSearchSource = new SearchSource().inherits(searchSource);
resp = await agg.type.postFlightRequest(resp, vis.aggs, agg, nestedSearchSource);
}