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 ebf2378 commit c2f4931Copy full SHA for c2f4931
src/node_native_module_env.cc
@@ -131,8 +131,9 @@ void NativeModuleEnv::CompileFunction(const FunctionCallbackInfo<Value>& args) {
131
NativeModuleLoader::GetInstance()->CompileAsModule(
132
env->context(), id, &result);
133
RecordResult(id, result, env);
134
- if (!maybe.IsEmpty()) {
135
- args.GetReturnValue().Set(maybe.ToLocalChecked());
+ Local<Function> fn;
+ if (maybe.ToLocal(&fn)) {
136
+ args.GetReturnValue().Set(fn);
137
}
138
139
0 commit comments