Skip to content

Commit 0545b5f

Browse files
committed
worker: parse NODE_OPTIONS when env option is not provided
1 parent bb73c10 commit 0545b5f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/node_worker.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -559,7 +559,7 @@ void Worker::New(const FunctionCallbackInfo<Value>& args) {
559559
env_vars = env->env_vars();
560560
}
561561

562-
if (args[1]->IsObject() || args[2]->IsArray()) {
562+
if (args[1]->IsNull() || args[1]->IsObject() || args[2]->IsArray()) {
563563
per_isolate_opts.reset(new PerIsolateOptions());
564564

565565
HandleEnvOptions(per_isolate_opts->per_env, [&env_vars](const char* name) {

0 commit comments

Comments
 (0)