From 7b609b86e8e10de859d3ee3afb6de7d0a88d8cc0 Mon Sep 17 00:00:00 2001 From: Hannah Mudge Date: Tue, 17 Sep 2024 12:18:57 -0600 Subject: [PATCH] Fix timeslider registration to await new services --- .../timeslider_control/register_timeslider_control.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/plugins/controls/public/react_controls/controls/timeslider_control/register_timeslider_control.ts b/src/plugins/controls/public/react_controls/controls/timeslider_control/register_timeslider_control.ts index 252b89e849066a..d3de7a97b6399f 100644 --- a/src/plugins/controls/public/react_controls/controls/timeslider_control/register_timeslider_control.ts +++ b/src/plugins/controls/public/react_controls/controls/timeslider_control/register_timeslider_control.ts @@ -9,14 +9,15 @@ import type { CoreSetup } from '@kbn/core/public'; import { TIME_SLIDER_CONTROL } from '../../../../common'; +import { untilPluginStartServicesReady } from '../../../services/kibana_services'; import type { ControlsPluginStartDeps } from '../../../types'; import { registerControlFactory } from '../../control_factory_registry'; export function registerTimeSliderControl(coreSetup: CoreSetup) { registerControlFactory(TIME_SLIDER_CONTROL, async () => { - const [{ getTimesliderControlFactory }, [coreStart, depsStart]] = await Promise.all([ + const [{ getTimesliderControlFactory }] = await Promise.all([ import('./get_timeslider_control_factory'), - coreSetup.getStartServices(), + untilPluginStartServicesReady(), ]); return getTimesliderControlFactory(); });