mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00:00
src: remove unnecessary ToLocalChecked call
PR-URL: https://github.com/nodejs/node/pull/33683 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
This commit is contained in:
@@ -131,8 +131,9 @@ void NativeModuleEnv::CompileFunction(const FunctionCallbackInfo<Value>& args) {
|
||||
NativeModuleLoader::GetInstance()->CompileAsModule(
|
||||
env->context(), id, &result);
|
||||
RecordResult(id, result, env);
|
||||
if (!maybe.IsEmpty()) {
|
||||
args.GetReturnValue().Set(maybe.ToLocalChecked());
|
||||
Local<Function> fn;
|
||||
if (maybe.ToLocal(&fn)) {
|
||||
args.GetReturnValue().Set(fn);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user