Skip to content

Commit

Permalink
Update packages/babel-parser/src/plugins/placeholders.js
Browse files Browse the repository at this point in the history
Co-authored-by: Nicol貌 Ribaudo <nicolo.ribaudo@gmail.com>
  • Loading branch information
JLHwung and nicolo-ribaudo committed Jun 5, 2020
1 parent 44a3486 commit a6138fb
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/babel-parser/src/plugins/placeholders.js
Expand Up @@ -256,8 +256,10 @@ export default (superClass: Class<Parser>): Class<Parser> =>
const next = this.nextTokenStart();
if (this.isUnparsedContextual(next, "from")) {
if (
this.input.substr(this.nextTokenStartSince(next + 4), 2) ===
tt.placeholder.label
this.input.startsWith(
tt.placeholder.label,
this.nextTokenStartSince(next + 4),
)
) {
return true;
}
Expand Down

0 comments on commit a6138fb

Please sign in to comment.