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 @@ -31,6 +31,7 @@ using v8::Integer;
3131using v8::Isolate;
3232using v8::Local;
3333using v8::Locker;
34+ using v8::Maybe;
3435using v8::MaybeLocal;
3536using v8::Null;
3637using v8::Number;
@@ -482,14 +483,9 @@ void Worker::New(const FunctionCallbackInfo<Value>& args) {
482483 if (args[1 ]->IsObject () || args[2 ]->IsArray ()) {
483484 per_isolate_opts.reset (new PerIsolateOptions ());
484485
485- HandleEnvOptions (
486- per_isolate_opts->per_env , [isolate, &env_vars](const char * name) {
487- MaybeLocal<String> value =
488- env_vars->Get (isolate, OneByteString (isolate, name));
489- return value.IsEmpty () ? std::string{}
490- : std::string (*String::Utf8Value (
491- isolate, value.ToLocalChecked ()));
492- });
486+ HandleEnvOptions (per_isolate_opts->per_env , [&env_vars](const char * name) {
487+ return env_vars->Get (name).FromMaybe (" " );
488+ });
493489
494490#ifndef NODE_WITHOUT_NODE_OPTIONS
495491 MaybeLocal<String> maybe_node_opts =
You can’t perform that action at this time.
0 commit comments