File tree Expand file tree Collapse file tree 1 file changed +4
-8
lines changed
Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ using v8::Integer;
3030using v8::Isolate;
3131using v8::Local;
3232using v8::Locker;
33+ using v8::Maybe;
3334using v8::MaybeLocal;
3435using v8::Null;
3536using v8::Number;
@@ -496,14 +497,9 @@ void Worker::New(const FunctionCallbackInfo<Value>& args) {
496497 if (args[1 ]->IsObject () || args[2 ]->IsArray ()) {
497498 per_isolate_opts.reset (new PerIsolateOptions ());
498499
499- HandleEnvOptions (
500- per_isolate_opts->per_env , [isolate, &env_vars](const char * name) {
501- MaybeLocal<String> value =
502- env_vars->Get (isolate, OneByteString (isolate, name));
503- return value.IsEmpty () ? std::string{}
504- : std::string (*String::Utf8Value (
505- isolate, value.ToLocalChecked ()));
506- });
500+ HandleEnvOptions (per_isolate_opts->per_env , [&env_vars](const char * name) {
501+ return env_vars->Get (name).FromMaybe (" " );
502+ });
507503
508504#ifndef NODE_WITHOUT_NODE_OPTIONS
509505 MaybeLocal<String> maybe_node_opts =
You can’t perform that action at this time.
0 commit comments