Skip to content

Commit

Permalink
Fix timeslider registration to await new services
Browse files Browse the repository at this point in the history
  • Loading branch information
Heenawter committed Sep 17, 2024
1 parent c71bfeb commit 7b609b8
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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<ControlsPluginStartDeps>) {
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();
});
Expand Down

0 comments on commit 7b609b8

Please sign in to comment.