diff --git a/src/node.cc b/src/node.cc index da6aebf7178cf6..90b04df7e5cd88 100644 --- a/src/node.cc +++ b/src/node.cc @@ -165,11 +165,11 @@ MaybeLocal ExecuteBootstrapper(Environment* env, MaybeLocal maybe_fn = NativeModuleEnv::LookupAndCompile(env->context(), id, parameters, env); - if (maybe_fn.IsEmpty()) { + Local fn; + if (!maybe_fn.ToLocal(&fn)) { return MaybeLocal(); } - Local fn = maybe_fn.ToLocalChecked(); MaybeLocal result = fn->Call(env->context(), Undefined(env->isolate()), arguments->size(),