Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fixup! esm: graduate top-level-await to stable
  • Loading branch information
aduh95 committed Apr 26, 2022
commit b04af6553f9e6402027a052f2654f3389f102c1a
4 changes: 0 additions & 4 deletions src/module_wrap.cc
Original file line number Diff line number Diff line change
Expand Up @@ -428,10 +428,6 @@ void ModuleWrap::Evaluate(const FunctionCallbackInfo<Value>& args) {
return;
}

// If TLA is enabled, `result` is the evaluation's promise.
// Otherwise, `result` is the last evaluated value of the module,
// which could be a promise, which would result in it being incorrectly
// unwrapped when the higher level code awaits the evaluation.
args.GetReturnValue().Set(result.ToLocalChecked());
}

Expand Down
4 changes: 2 additions & 2 deletions src/node_options.cc
Original file line number Diff line number Diff line change
Expand Up @@ -704,8 +704,8 @@ PerIsolateOptionsParser::PerIsolateOptionsParser(
kAllowedInEnvironment);
Implies("--report-signal", "--report-on-signal");

AddOption("--experimental-top-level-await", "",
NoOp{}, kAllowedInEnvironment);
AddOption(
"--experimental-top-level-await", "", NoOp{}, kAllowedInEnvironment);

Insert(eop, &PerIsolateOptions::get_per_env_options);
}
Expand Down