We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 18c5af7 commit a7dd5faCopy full SHA for a7dd5fa
src/statement.js
@@ -187,7 +187,7 @@ pp.parseDoStatement = function(node) {
187
188
pp.parseForStatement = function(node) {
189
this.next()
190
- let awaitAt = (this.options.ecmaVersion >= 9 && this.inAsync && this.eatContextual("await")) ? this.lastTokStart : -1
+ let awaitAt = (this.options.ecmaVersion >= 9 && (this.inAsync || (!this.inFunction && this.options.allowAwaitOutsideFunction)) && this.eatContextual("await")) ? this.lastTokStart : -1
191
this.labels.push(loopLabel)
192
this.enterLexicalScope()
193
this.expect(tt.parenL)
0 commit comments