Skip to content

Commit 5b8cac8

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 35cee03 commit 5b8cac8

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
@@ -127,8 +127,9 @@ void NativeModuleEnv::CompileFunction(const FunctionCallbackInfo<Value>& args) {
127127
NativeModuleLoader::GetInstance()->CompileAsModule(
128128
env->context(), id, &result);
129129
RecordResult(id, result, env);
130-
if (!maybe.IsEmpty()) {
131-
args.GetReturnValue().Set(maybe.ToLocalChecked());
130+
Local<Function> fn;
131+
if (maybe.ToLocal(&fn)) {
132+
args.GetReturnValue().Set(fn);
132133
}
133134
}
134135

0 commit comments

Comments
 (0)