Skip to content

Commit

Permalink
chore: fix Sonar issue
Browse files Browse the repository at this point in the history
  • Loading branch information
mu88 committed Jul 19, 2024
1 parent 82d91bf commit 3969f60
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/ScreenshotCreator.Logic/PlaywrightFacade.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -31,8 +30,7 @@ public async ValueTask<IPage> 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") });
}
}

0 comments on commit 3969f60

Please sign in to comment.