From 4362c2ed39c54158a68beafad7395a1b2b4a363b Mon Sep 17 00:00:00 2001 From: Hannah Mudge Date: Thu, 27 Jun 2024 14:40:34 -0600 Subject: [PATCH] Address `TODO` --- .../panel_actions/get_csv_panel_action.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/kbn-reporting/get_csv_panel_actions/panel_actions/get_csv_panel_action.tsx b/packages/kbn-reporting/get_csv_panel_actions/panel_actions/get_csv_panel_action.tsx index b2a4d13dc37ac..a220c54cbaafd 100644 --- a/packages/kbn-reporting/get_csv_panel_actions/panel_actions/get_csv_panel_action.tsx +++ b/packages/kbn-reporting/get_csv_panel_actions/panel_actions/get_csv_panel_action.tsx @@ -82,14 +82,15 @@ interface ExecutionParams { i18nStart: I18nStart; } -type GetCsvActionApi = HasType & PublishesSavedSearch & CanAccessViewMode & HasTimeRange; // TODO: Fix this? +type GetCsvActionApi = HasType & PublishesSavedSearch & CanAccessViewMode & HasTimeRange; const compatibilityCheck = (api: EmbeddableApiContext['embeddable']): api is GetCsvActionApi => { return ( apiHasType(api) && apiIsOfType(api, SEARCH_EMBEDDABLE_TYPE) && apiPublishesSavedSearch(api) && - apiCanAccessViewMode(api) + apiCanAccessViewMode(api) && + Boolean((api as unknown as HasTimeRange).hasTimeRange) ); };