Skip to content

Commit

Permalink
remove redundant check
Browse files Browse the repository at this point in the history
  • Loading branch information
guybedford committed Jun 25, 2021
1 parent 668e201 commit 49b2acb
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions lib/internal/repl/await.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,9 @@ function processTopLevelAwait(src) {
// Convert keyword parse errors on await into their original errors when
// possible.
if (errPos === awaitPos + 6 &&
src.slice(errPos - 6, errPos - 1) === 'await' &&
e.message.includes('Expecting Unicode escape sequence'))
return null;
if (errPos === awaitPos + 7 &&
src.slice(errPos - 7, errPos - 2) === 'await' &&
e.message.includes('Unexpected token'))
return null;
const { line, column } = e.loc;
Expand Down

0 comments on commit 49b2acb

Please sign in to comment.