Skip to content

Commit

Permalink
[squash] address nit
Browse files Browse the repository at this point in the history
  • Loading branch information
addaleax committed Jun 8, 2017
1 parent 2652910 commit 4acaed3
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/async-wrap.cc
Original file line number Diff line number Diff line change
Expand Up @@ -336,10 +336,9 @@ static void PromiseHook(PromiseHookType type, Local<Promise> promise,
Local<Context> context = promise->CreationContext();
Environment* env = Environment::GetCurrent(context);
Local<Value> resource_object_value = promise->GetInternalField(0);
Local<Object> resource_object;
PromiseWrap* wrap = nullptr;
if (resource_object_value->IsObject()) {
resource_object = resource_object_value.As<Object>();
Local<Object> resource_object = resource_object_value.As<Object>();
wrap = Unwrap<PromiseWrap>(resource_object);
}
if (type == PromiseHookType::kInit || wrap == nullptr) {
Expand Down

0 comments on commit 4acaed3

Please sign in to comment.