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;
30
30
using v8::Isolate;
31
31
using v8::Local;
32
32
using v8::Locker;
33
+ using v8::Maybe;
33
34
using v8::MaybeLocal;
34
35
using v8::Null;
35
36
using v8::Number;
@@ -504,14 +505,9 @@ void Worker::New(const FunctionCallbackInfo<Value>& args) {
504
505
if (args[1 ]->IsObject () || args[2 ]->IsArray ()) {
505
506
per_isolate_opts.reset (new PerIsolateOptions ());
506
507
507
- HandleEnvOptions (
508
- per_isolate_opts->per_env , [isolate, &env_vars](const char * name) {
509
- MaybeLocal<String> value =
510
- env_vars->Get (isolate, OneByteString (isolate, name));
511
- return value.IsEmpty () ? std::string{}
512
- : std::string (*String::Utf8Value (
513
- isolate, value.ToLocalChecked ()));
514
- });
508
+ HandleEnvOptions (per_isolate_opts->per_env , [&env_vars](const char * name) {
509
+ return env_vars->Get (name).FromMaybe (" " );
510
+ });
515
511
516
512
#ifndef NODE_WITHOUT_NODE_OPTIONS
517
513
MaybeLocal<String> maybe_node_opts =
You can’t perform that action at this time.
0 commit comments