diff --git a/x-pack/plugins/screenshotting/server/plugin.ts b/x-pack/plugins/screenshotting/server/plugin.ts index bc15dfb1a3989..a301dd6764367 100755 --- a/x-pack/plugins/screenshotting/server/plugin.ts +++ b/x-pack/plugins/screenshotting/server/plugin.ts @@ -45,7 +45,7 @@ export class ScreenshottingPlugin implements Plugin; + private browserDriverFactory!: Promise; constructor(context: PluginInitializerContext) { this.logger = context.logger.get(); @@ -76,10 +76,10 @@ export class ScreenshottingPlugin implements Plugin - from(this.browserDriverFactory).pipe(switchMap((factory) => factory!.diagnose())), + from(this.browserDriverFactory).pipe(switchMap((factory) => factory.diagnose())), getScreenshots: (options) => from(this.browserDriverFactory).pipe( - switchMap((factory) => getScreenshots(factory!, this.logger.get('screenshot'), options)) + switchMap((factory) => getScreenshots(factory, this.logger.get('screenshot'), options)) ), }; }