From bffb7103830864f55c02ae3e5f02bdfc71d8bbf5 Mon Sep 17 00:00:00 2001 From: Tim Sullivan Date: Wed, 10 Nov 2021 12:02:19 -0700 Subject: [PATCH] Update x-pack/plugins/reporting/server/browsers/chromium/driver_factory/index.ts Co-authored-by: Michael Dokolin --- .../server/browsers/chromium/driver_factory/index.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/x-pack/plugins/reporting/server/browsers/chromium/driver_factory/index.ts b/x-pack/plugins/reporting/server/browsers/chromium/driver_factory/index.ts index a5dc240bb1cd3..2aef62f59985b 100644 --- a/x-pack/plugins/reporting/server/browsers/chromium/driver_factory/index.ts +++ b/x-pack/plugins/reporting/server/browsers/chromium/driver_factory/index.ts @@ -130,9 +130,7 @@ export class HeadlessChromiumDriverFactory { } try { - if (browser) { - await browser.close(); - } + await browser?.close(); } catch (err) { // do not throw logger.error(err);