Skip to content

Commit

Permalink
Add null check
Browse files Browse the repository at this point in the history
  • Loading branch information
a-gubskiy committed Aug 1, 2024
1 parent cdfa2b8 commit a6e3b9e
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,13 @@ public virtual async Task<string> LoadPageContentAsync(Uri uri)
return await ReadFromResponseAsync(bytes);
}

protected static async Task<string> ReadFromResponseAsync(byte[] bytes)
protected static async Task<string> ReadFromResponseAsync(byte[]? bytes)
{
if (bytes == null)
{
return string.Empty;
}

try
{
return await ReadFromGzipStreamAsync(new MemoryStream(bytes));
Expand Down

0 comments on commit a6e3b9e

Please sign in to comment.