diff --git a/x-pack/plugins/log_explorer/public/components/log_explorer/log_explorer.tsx b/x-pack/plugins/log_explorer/public/components/log_explorer/log_explorer.tsx index 10bd9039751f1..fa76cadeb727b 100644 --- a/x-pack/plugins/log_explorer/public/components/log_explorer/log_explorer.tsx +++ b/x-pack/plugins/log_explorer/public/components/log_explorer/log_explorer.tsx @@ -6,7 +6,7 @@ */ import { ScopedHistory } from '@kbn/core-application-browser'; -import { DataPublicPluginStart, ISearchStart, ISessionService } from '@kbn/data-plugin/public'; +import { DataPublicPluginStart } from '@kbn/data-plugin/public'; import { DiscoverStart } from '@kbn/discover-plugin/public'; import React from 'react'; import { @@ -50,13 +50,17 @@ export const createLogExplorer = ({ * are no-ops. */ const createDataServiceProxy = (data: DataPublicPluginStart) => { + const noOpEnableStorage = () => {}; + + const sessionServiceProxy = createPropertyGetProxy(data.search.session, { + enableStorage: () => noOpEnableStorage, + }); + + const searchServiceProxy = createPropertyGetProxy(data.search, { + session: () => sessionServiceProxy, + }); + return createPropertyGetProxy(data, { - search: (searchService: ISearchStart) => - createPropertyGetProxy(searchService, { - session: (sessionService: ISessionService) => - createPropertyGetProxy(sessionService, { - enableStorage: () => () => {}, - }), - }), + search: () => searchServiceProxy, }); };