Skip to content

Commit

Permalink
Remove unnecessary comment
Browse files Browse the repository at this point in the history
  • Loading branch information
Heenawter committed Jul 29, 2024
1 parent 5080816 commit 03c9209
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export class ViewSavedSearchAction implements Action<EmbeddableApiContext> {
const hasDiscoverPermissions =
(capabilities.discover.show as boolean) || (capabilities.discover.save as boolean);

if (!hasDiscoverPermissions) return false;
if (!hasDiscoverPermissions) return false; // early return to delay async import until absolutely necessary
const { compatibilityCheck } = await import('./view_saved_search_compatibility_check');
return compatibilityCheck(embeddable);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ import { apiPublishesSavedSearch, PublishesSavedSearch } from '../types';

type ViewSavedSearchActionApi = CanAccessViewMode & HasType & PublishesSavedSearch;

/** Async type guards aren't supported, so need to make this an async getter instead */
export const compatibilityCheck = (
api: EmbeddableApiContext['embeddable']
): api is ViewSavedSearchActionApi => {
Expand Down

0 comments on commit 03c9209

Please sign in to comment.