We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6122620 commit 31e4a0dCopy full SHA for 31e4a0d
src/async_wrap-inl.h
@@ -74,9 +74,8 @@ inline v8::MaybeLocal<v8::Value> AsyncWrap::MakeCallback(
74
if (!object()->Get(env()->context(), symbol).ToLocal(&cb_v))
75
return v8::MaybeLocal<v8::Value>();
76
if (!cb_v->IsFunction()) {
77
- // TODO(addaleax): We should throw an error here to fulfill the
78
- // `MaybeLocal<>` API contract.
79
- return v8::MaybeLocal<v8::Value>();
+ v8::Isolate* isolate = env()->isolate();
+ return Undefined(isolate);
80
}
81
return MakeCallback(cb_v.As<v8::Function>(), argc, argv);
82
0 commit comments