File tree 1 file changed +4
-8
lines changed 1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -31,6 +31,7 @@ using v8::Integer;
31
31
using v8::Isolate;
32
32
using v8::Local;
33
33
using v8::Locker;
34
+ using v8::Maybe;
34
35
using v8::MaybeLocal;
35
36
using v8::Null;
36
37
using v8::Number;
@@ -482,14 +483,9 @@ void Worker::New(const FunctionCallbackInfo<Value>& args) {
482
483
if (args[1 ]->IsObject () || args[2 ]->IsArray ()) {
483
484
per_isolate_opts.reset (new PerIsolateOptions ());
484
485
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
+ });
493
489
494
490
#ifndef NODE_WITHOUT_NODE_OPTIONS
495
491
MaybeLocal<String> maybe_node_opts =
You can’t perform that action at this time.
0 commit comments