From 03c920904725849a851d5a8f149628b03ddf90b5 Mon Sep 17 00:00:00 2001 From: Hannah Mudge Date: Mon, 29 Jul 2024 16:14:16 -0600 Subject: [PATCH] Remove unnecessary comment --- .../public/embeddable/actions/view_saved_search_action.ts | 2 +- .../embeddable/actions/view_saved_search_compatibility_check.ts | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/plugins/discover/public/embeddable/actions/view_saved_search_action.ts b/src/plugins/discover/public/embeddable/actions/view_saved_search_action.ts index 6c37f8eb780c9..490d1e08cbdb5 100644 --- a/src/plugins/discover/public/embeddable/actions/view_saved_search_action.ts +++ b/src/plugins/discover/public/embeddable/actions/view_saved_search_action.ts @@ -50,7 +50,7 @@ export class ViewSavedSearchAction implements Action { 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); } diff --git a/src/plugins/discover/public/embeddable/actions/view_saved_search_compatibility_check.ts b/src/plugins/discover/public/embeddable/actions/view_saved_search_compatibility_check.ts index 67c59d2a01259..06eaa548b5b77 100644 --- a/src/plugins/discover/public/embeddable/actions/view_saved_search_compatibility_check.ts +++ b/src/plugins/discover/public/embeddable/actions/view_saved_search_compatibility_check.ts @@ -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 => {