Skip to content

Commit

Permalink
Wait on overallStats to complete
Browse files Browse the repository at this point in the history
  • Loading branch information
qn895 committed Nov 5, 2021
1 parent f88e1f4 commit 8b3d4c3
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/

import { useCallback, useEffect, useState, useRef, useMemo, useReducer } from 'react';
import { combineLatest, forkJoin, of, Subscription } from 'rxjs';
import { forkJoin, of, Subscription } from 'rxjs';
import { switchMap } from 'rxjs/operators';
import { i18n } from '@kbn/i18n';
import type { ToastsStart } from 'kibana/public';
Expand Down Expand Up @@ -113,7 +113,7 @@ export function useOverallStats<TParams extends OverallStatsSearchStrategyParams
};
const nonAggregatableOverallStats$ =
nonAggregatableFields.length > 0
? combineLatest(
? forkJoin(
nonAggregatableFields.map((fieldName: string) =>
data.search
.search<IKibanaSearchRequest, IKibanaSearchResponse>(
Expand Down

0 comments on commit 8b3d4c3

Please sign in to comment.