Skip to content

Commit

Permalink
fix: fix promise state.
Browse files Browse the repository at this point in the history
  • Loading branch information
andycall committed May 30, 2022
1 parent 9701560 commit 05e59b9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bridge/bindings/qjs/script_promise_resolver.cc
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ std::shared_ptr<ScriptPromiseResolver> ScriptPromiseResolver::Create(ExecutingCo
return std::make_shared<ScriptPromiseResolver>(context);
}

ScriptPromiseResolver::ScriptPromiseResolver(ExecutingContext* context) : context_(context) {
ScriptPromiseResolver::ScriptPromiseResolver(ExecutingContext* context) : context_(context), state_(ResolutionState::kPending) {
JSValue resolving_funcs[2];
promise_ = JS_NewPromiseCapability(context->ctx(), resolving_funcs);
resolve_func_ = resolving_funcs[0];
Expand Down

0 comments on commit 05e59b9

Please sign in to comment.