Skip to content

Commit

Permalink
Update lib/internal/repl/await.js
Browse files Browse the repository at this point in the history
Co-authored-by: Jordan Harband <ljharb@gmail.com>
  • Loading branch information
guybedford and ljharb authored Jun 27, 2021
1 parent 66e70d3 commit c395b21
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/internal/repl/await.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ function processTopLevelAwait(src) {
try {
root = parser.parse(wrapped, { ecmaVersion: 'latest' });
} catch (e) {
if (e.message.startsWith('Unterminated '))
if (StringPrototypeStartsWith(e.message, 'Unterminated '))
throw new Recoverable(e);
// If the parse error is before the first "await", then use the execution
// error. Otherwise we must emit this parse error, making it look like a
Expand Down

0 comments on commit c395b21

Please sign in to comment.