mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
* guard against empty and undefined index pattern arrays * fix merge issues
This commit is contained in:
parent
6f864e282a
commit
01dc301d6f
1 changed files with 6 additions and 2 deletions
|
@ -19,7 +19,7 @@
|
|||
|
||||
import { IndexPattern } from 'ui/index_patterns';
|
||||
|
||||
import { debounce, isEqual } from 'lodash';
|
||||
import { compact, debounce, isEqual } from 'lodash';
|
||||
import React, { Component } from 'react';
|
||||
import { getFromLegacyIndexPattern } from 'ui/index_patterns/static_utils';
|
||||
import { kfetch } from 'ui/kfetch';
|
||||
|
@ -184,7 +184,11 @@ export class QueryBar extends Component<Props, State> {
|
|||
const recentSearchSuggestions = this.getRecentSearchSuggestions(query);
|
||||
|
||||
const autocompleteProvider = getAutocompleteProvider(language);
|
||||
if (!autocompleteProvider) {
|
||||
if (
|
||||
!autocompleteProvider ||
|
||||
!Array.isArray(this.props.indexPatterns) ||
|
||||
compact(this.props.indexPatterns).length === 0
|
||||
) {
|
||||
return recentSearchSuggestions;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue