Skip to content

Commit

Permalink
Remove wait in event loop
Browse files Browse the repository at this point in the history
  • Loading branch information
Trung Tran authored and lahma committed Jun 22, 2024
1 parent 2aaaf81 commit 50999b8
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions Jint/JsValueExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -652,8 +652,7 @@ public static JsValue UnwrapIfPromise(this JsValue value)
var engine = promise.Engine;
var completedEvent = promise.CompletedEvent;
engine.RunAvailableContinuations();
engine.AddToEventLoop(completedEvent.Wait);
engine.RunAvailableContinuations();
completedEvent.Wait();
switch (promise.State)
{
case PromiseState.Pending:
Expand Down

0 comments on commit 50999b8

Please sign in to comment.