Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

repl: hide top-level await feature behind a flag #19604

Closed
wants to merge 5 commits into from
Closed
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
Next Next commit
fixup! fixup! repl: hide top-level await feature behind a flag
  • Loading branch information
TimothyGu committed Apr 14, 2018
commit 96206f9591baf61c182cad884476539780e93a54
3 changes: 2 additions & 1 deletion lib/repl.js
Original file line number Diff line number Diff line change
Expand Up @@ -230,8 +230,9 @@ function REPLServer(prompt,
}

if (experimentalREPLAwait && code.includes('await')) {
if (processTopLevelAwait === undefined)
if (processTopLevelAwait === undefined) {
;({ processTopLevelAwait } = require('internal/repl/await'));
}

const potentialWrappedCode = processTopLevelAwait(code);
if (potentialWrappedCode !== null) {
Expand Down