Skip to content

Commit

Permalink
Catch fetchSurroundingDocs missing anchor (#43661) (#43835)
Browse files Browse the repository at this point in the history
  • Loading branch information
kertal authored Aug 23, 2019
1 parent cbbf2fc commit ad10fb2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/legacy/core_plugins/kibana/public/context/api/context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@ function fetchContextProvider(indexPatterns: IndexPatterns, Private: IPrivate) {
size: number,
filters: Filter[]
) {
if (typeof anchor !== 'object' || anchor === null) {
return [];
}
const indexPattern = await indexPatterns.get(indexPatternId);
const searchSource = await createSearchSource(indexPattern, filters);
const sortDirToApply = type === 'successors' ? sortDir : reverseSortDir(sortDir);
Expand Down

0 comments on commit ad10fb2

Please sign in to comment.