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 4, 2020
1 parent 44a3486 commit 60d7554
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/babel-parser/src/plugins/placeholders.js
Expand Up @@ -256,8 +256,8 @@ 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 60d7554

Please sign in to comment.