Skip to content

Commit

Permalink
simplify strategy registration
Browse files Browse the repository at this point in the history
  • Loading branch information
Liza K committed Jul 7, 2020
1 parent 1b02297 commit 696215b
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/plugins/data/server/search/search_service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,10 @@ export class SearchService implements Plugin<ISearchSetup, ISearchStart> {
public setup(core: CoreSetup<object, DataPluginStart>): ISearchSetup {
core.savedObjects.registerType(searchSavedObjectType);

core.getStartServices().then(([coreStart]) => {
this.registerSearchStrategy(
ES_SEARCH_STRATEGY,
esSearchStrategyProvider(this.initializerContext.config.legacy.globalConfig$)
);
});
this.registerSearchStrategy(
ES_SEARCH_STRATEGY,
esSearchStrategyProvider(this.initializerContext.config.legacy.globalConfig$)
);

registerSearchRoute(core);

Expand Down

0 comments on commit 696215b

Please sign in to comment.