diff options
author | Gerhard Stoebich <18708370+Flarna@users.noreply.github.com> | 2020-02-03 10:44:52 +0300 |
---|---|---|
committer | Shelley Vohr <shelley.vohr@gmail.com> | 2020-02-17 23:14:41 +0300 |
commit | 0e44902b85e6b40fa094d89493174cec96b41c33 (patch) | |
tree | c2c3577dc44868c5b6837181e1e1cbfc2478a7b6 /src/api | |
parent | 1592c474dabc3e9b198b473cc0178e4a8e15d62e (diff) |
src: remove dead code in InternalMakeCallback
Remove unneeded condition as the first line in function already
ensures that recv can't be empty.
PR-URL: https://github.com/nodejs/node/pull/31622
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Yihong Wang <yh.wang@ibm.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Diffstat (limited to 'src/api')
-rw-r--r-- | src/api/callback.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/api/callback.cc b/src/api/callback.cc index 355986b981a..5e3fd659033 100644 --- a/src/api/callback.cc +++ b/src/api/callback.cc @@ -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); |