Skip to content

Commit c2f4931

Browse files
danbevcodebytere
authored andcommitted
src: remove unnecessary ToLocalChecked call
PR-URL: #33683 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: David Carlier <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Juan José Arboleda <[email protected]>
1 parent ebf2378 commit c2f4931

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/node_native_module_env.cc

+3-2
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,9 @@ void NativeModuleEnv::CompileFunction(const FunctionCallbackInfo<Value>& args) {
131131
NativeModuleLoader::GetInstance()->CompileAsModule(
132132
env->context(), id, &result);
133133
RecordResult(id, result, env);
134-
if (!maybe.IsEmpty()) {
135-
args.GetReturnValue().Set(maybe.ToLocalChecked());
134+
Local<Function> fn;
135+
if (maybe.ToLocal(&fn)) {
136+
args.GetReturnValue().Set(fn);
136137
}
137138
}
138139

0 commit comments

Comments
 (0)