Skip to content

Commit a352178

Browse files
committed
worker: parse NODE_OPTIONS when env option is not provided
1 parent 4d2d6de commit a352178

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/node_worker.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -561,7 +561,7 @@ void Worker::New(const FunctionCallbackInfo<Value>& args) {
561561
THROW_ERR_OPERATION_FAILED(env, "Failed to copy environment variables");
562562
}
563563

564-
if (args[1]->IsObject() || args[2]->IsArray()) {
564+
if (args[1]->IsNull() || args[1]->IsObject() || args[2]->IsArray()) {
565565
per_isolate_opts.reset(new PerIsolateOptions());
566566

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

0 commit comments

Comments
 (0)