diff --git a/x-pack/plugins/exploratory_view/public/components/shared/exploratory_view/embeddable/index.tsx b/x-pack/plugins/exploratory_view/public/components/shared/exploratory_view/embeddable/index.tsx index 85fb195d29d4f..aa07c2c2d3551 100644 --- a/x-pack/plugins/exploratory_view/public/components/shared/exploratory_view/embeddable/index.tsx +++ b/x-pack/plugins/exploratory_view/public/components/shared/exploratory_view/embeddable/index.tsx @@ -138,7 +138,7 @@ export function getExploratoryViewEmbeddable( {...embedProps} dataViewState={dataViews} lens={lens} - lensFormulaHelper={lensHelper.formula} + lensFormulaHelper={lensHelper?.formula} searchSessionId={services.data.search.session.getSessionId()} onLoad={onLensLoaded} /> diff --git a/x-pack/plugins/exploratory_view/public/components/shared/exploratory_view/embeddable/use_app_data_view.ts b/x-pack/plugins/exploratory_view/public/components/shared/exploratory_view/embeddable/use_app_data_view.ts index ab1ca8827c58a..0852c98bb3dc9 100644 --- a/x-pack/plugins/exploratory_view/public/components/shared/exploratory_view/embeddable/use_app_data_view.ts +++ b/x-pack/plugins/exploratory_view/public/components/shared/exploratory_view/embeddable/use_app_data_view.ts @@ -48,5 +48,5 @@ export const useAppDataView = ({ // eslint-disable-next-line react-hooks/exhaustive-deps }, [dataViewTitle, seriesDataType, JSON.stringify(series)]); - return { dataViews, loading }; + return { dataViews, loading: loading && !dataViews[seriesDataType] }; };