From 3969f60103fd9e31cdb991fb3519ad09d2d55432 Mon Sep 17 00:00:00 2001 From: mu88 <4560672+mu88@users.noreply.github.com> Date: Fri, 19 Jul 2024 15:57:52 +0200 Subject: [PATCH] chore: fix Sonar issue --- src/ScreenshotCreator.Logic/PlaywrightFacade.cs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/ScreenshotCreator.Logic/PlaywrightFacade.cs b/src/ScreenshotCreator.Logic/PlaywrightFacade.cs index c8b9195..709822b 100644 --- a/src/ScreenshotCreator.Logic/PlaywrightFacade.cs +++ b/src/ScreenshotCreator.Logic/PlaywrightFacade.cs @@ -6,7 +6,6 @@ internal sealed class PlaywrightFacade : IPlaywrightFacade { private IBrowser? _browser; private bool _disposed; - private IPage? _page; private IPlaywright? _playwright; public async ValueTask DisposeAsync() @@ -31,8 +30,7 @@ public async ValueTask GetPlaywrightPageAsync() _playwright?.Dispose(); _playwright = await Playwright.CreateAsync(); _browser = await _playwright.Chromium.LaunchAsync(); - _page = await _browser.NewPageAsync(new BrowserNewPageOptions { TimezoneId = Environment.GetEnvironmentVariable("TZ") }); - return _page; + return await _browser.NewPageAsync(new BrowserNewPageOptions { TimezoneId = Environment.GetEnvironmentVariable("TZ") }); } } \ No newline at end of file