Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
src: remove dead code in InternalMakeCallback
Remove unneeded condition as the first line in function already
ensures that recv can't be empty.
  • Loading branch information
Flarna committed Feb 3, 2020
commit c7254360d395d4653a4110874f5638e96bbd104d
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