diff --git a/packages/babel-parser/src/plugins/flow.js b/packages/babel-parser/src/plugins/flow.js index 8dcbdf7a54..e0a729334a 100644 --- a/packages/babel-parser/src/plugins/flow.js +++ b/packages/babel-parser/src/plugins/flow.js @@ -2726,11 +2726,7 @@ export default (superClass: Class): Class => } skipBlockComment(): void { - if ( - this.hasPlugin("flow") && - this.hasPlugin("flowComments") && - this.skipFlowComment() - ) { + if (this.hasPlugin("flowComments") && this.skipFlowComment()) { if (this.state.hasFlowComment) { this.unexpected( null, @@ -2743,7 +2739,7 @@ export default (superClass: Class): Class => return; } - if (this.hasPlugin("flow") && this.state.hasFlowComment) { + if (this.state.hasFlowComment) { const end = this.state.input.indexOf("*-/", (this.state.pos += 2)); if (end === -1) this.raise(this.state.pos - 2, "Unterminated comment"); this.state.pos = end + 3;