Skip to content

Commit

Permalink
@VelvetToroyashi solvings
Browse files Browse the repository at this point in the history
  • Loading branch information
Xicy authored Aug 21, 2023
1 parent 8965b51 commit 6c23400
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Jint/Runtime/Interop/DelegateWrapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ namespace Jint.Runtime.Interop
public sealed class DelegateWrapper : FunctionInstance
{
private static readonly JsString _name = new JsString("delegate");
private static readonly Type _voidTaskResultType = Task.CompletedTask.GetType.GetGenericArguments()[0];
private static readonly Type _voidTaskResultType = Task.CompletedTask.GetType().GetGenericArguments()[0];
private readonly Delegate _d;
private readonly bool _delegateContainsParamsArgument;

Expand Down Expand Up @@ -164,7 +164,7 @@ private JsValue ConvertTaskToPromise(Task task)

// Special case: Marshal `async Task` as undefined, as this is `Task<VoidTaskResult>` at runtime
// See https://github.com/sebastienros/jint/pull/1567#issuecomment-1681987702
if (taskType.IsGenericType && taskType.GetGenericArguments()[0] == _voidTaskResult)
if (taskType.IsGenericType && taskType.GetGenericArguments()[0] == _voidTaskResultType)
{
resolve(FromObject(Engine, JsValue.Undefined));
return;
Expand Down

0 comments on commit 6c23400

Please sign in to comment.