Skip to content

Commit

Permalink
AsyncDomExtensions - AndThen don't dispose if input null
Browse files Browse the repository at this point in the history
  • Loading branch information
amaitland committed Nov 2, 2024
1 parent f5cbefe commit 534ef78
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion PuppeteerSharp.Dom/AsyncDomExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ public static async Task<TOut> AndThen<TIn, TOut>(this Task<TIn> inputTask, Func

var result = await func(input).ConfigureAwait(false);

if (dispose)
if (dispose && input != null)
{
await input.DisposeAsync().ConfigureAwait(false);
}
Expand Down

0 comments on commit 534ef78

Please sign in to comment.