Skip to content

Commit

Permalink
add console messages
Browse files Browse the repository at this point in the history
  • Loading branch information
vadimkibana committed Feb 14, 2022
1 parent 2ef137a commit fd2ff68
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,11 @@ export const ResultsLinks: FC<Props> = ({
const getDiscoverUrl = async (): Promise<void> => {
const isDiscoverAvailable = capabilities.discover?.show ?? false;
if (!isDiscoverAvailable) return;
if (!discover.locator) return;
if (!discover.locator) {
// eslint-disable-next-line no-console
console.error('Discover locator not available');
return;
}
const discoverUrl = await discover.locator.getUrl({
indexPatternId,
timeRange: globalState?.time ? globalState.time : undefined,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,11 @@ export const ActionsPanel: FC<Props> = ({
const getDiscoverUrl = async (): Promise<void> => {
const isDiscoverAvailable = capabilities.discover?.show ?? false;
if (!isDiscoverAvailable) return;
if (!discover.locator) return;
if (!discover.locator) {
// eslint-disable-next-line no-console
console.error('Discover locator not available');
return;
}
const discoverUrl = await discover.locator.getUrl({
indexPatternId,
filters: data.query.filterManager.getFilters() ?? [],
Expand Down

0 comments on commit fd2ff68

Please sign in to comment.