Skip to content

Commit 5759846

Browse files
committed
Update ScriptModule.cs
1 parent 81c629d commit 5759846

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

dotnet/src/webdriver/BiDi/Modules/Script/ScriptModule.cs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,7 @@ public async Task<EvaluateResult> EvaluateAsync(string expression, bool awaitPro
2929
{
3030
var @params = new EvaluateCommandParameters(expression, target, awaitPromise, options?.ResultOwnership, options?.SerializationOptions, options?.UserActivation);
3131

32-
var result = await Broker.ExecuteCommandAsync<EvaluateCommand, EvaluateResult>(new EvaluateCommand(@params), options).ConfigureAwait(false);
33-
34-
return result;
32+
return await Broker.ExecuteCommandAsync<EvaluateCommand, EvaluateResult>(new EvaluateCommand(@params), options).ConfigureAwait(false);
3533
}
3634

3735
public async Task<TResult?> EvaluateAsync<TResult>(string expression, bool awaitPromise, Target target, EvaluateOptions? options = null)
@@ -45,9 +43,7 @@ public async Task<EvaluateResult> CallFunctionAsync(string functionDeclaration,
4543
{
4644
var @params = new CallFunctionCommandParameters(functionDeclaration, awaitPromise, target, options?.Arguments, options?.ResultOwnership, options?.SerializationOptions, options?.This, options?.UserActivation);
4745

48-
var result = await Broker.ExecuteCommandAsync<CallFunctionCommand, EvaluateResult>(new CallFunctionCommand(@params), options).ConfigureAwait(false);
49-
50-
return result;
46+
return await Broker.ExecuteCommandAsync<CallFunctionCommand, EvaluateResult>(new CallFunctionCommand(@params), options).ConfigureAwait(false);
5147
}
5248

5349
public async Task<TResult?> CallFunctionAsync<TResult>(string functionDeclaration, bool awaitPromise, Target target, CallFunctionOptions? options = null)

0 commit comments

Comments
 (0)