Skip to content

Commit

Permalink
revert change to guard a type
Browse files Browse the repository at this point in the history
  • Loading branch information
tsullivan committed Dec 7, 2021
1 parent 3bc5b0d commit a63d104
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions x-pack/plugins/screenshotting/server/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export class ScreenshottingPlugin implements Plugin<void, ScreenshottingStart, S
private config: ConfigType;
private logger: Logger;
private screenshotMode!: ScreenshotModePluginSetup;
private browserDriverFactory!: Promise<HeadlessChromiumDriverFactory | undefined>;
private browserDriverFactory!: Promise<HeadlessChromiumDriverFactory>;

constructor(context: PluginInitializerContext<ConfigType>) {
this.logger = context.logger.get();
Expand Down Expand Up @@ -76,10 +76,10 @@ export class ScreenshottingPlugin implements Plugin<void, ScreenshottingStart, S
start({}: CoreStart): ScreenshottingStart {
return {
diagnose: () =>
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))
),
};
}
Expand Down

0 comments on commit a63d104

Please sign in to comment.