Skip to content

Commit

Permalink
src: remove dead code in InternalMakeCallback
Browse files Browse the repository at this point in the history
Remove unneeded condition as the first line in function already
ensures that recv can't be empty.

PR-URL: #31622
Reviewed-By: Chengzhong Wu <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: David Carlier <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Yihong Wang <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
  • Loading branch information
Flarna authored and addaleax committed Feb 8, 2020
1 parent 9111e02 commit 7a63d76
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/api/callback.cc
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ MaybeLocal<Value> InternalMakeCallback(Environment* env,

Local<Function> domain_cb = env->domain_callback();
MaybeLocal<Value> ret;
if (asyncContext.async_id != 0 || domain_cb.IsEmpty() || recv.IsEmpty()) {
if (asyncContext.async_id != 0 || domain_cb.IsEmpty()) {
ret = callback->Call(env->context(), recv, argc, argv);
} else {
std::vector<Local<Value>> args(1 + argc);
Expand Down

0 comments on commit 7a63d76

Please sign in to comment.