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 @@ -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;
@@ -496,14 +497,9 @@ void Worker::New(const FunctionCallbackInfo<Value>& args) {
496
497
if (args[1 ]->IsObject () || args[2 ]->IsArray ()) {
497
498
per_isolate_opts.reset (new PerIsolateOptions ());
498
499
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
+ });
507
503
508
504
#ifndef NODE_WITHOUT_NODE_OPTIONS
509
505
MaybeLocal<String> maybe_node_opts =
You can’t perform that action at this time.
0 commit comments