fix Incorrect destructuring compilation of `for (let [[x] = [1… (#11360)

This commit is contained in:
Zen
2020-04-07 23:10:21 +08:00
committed by GitHub
parent e3ad798a24
commit ca096c56aa
3 changed files with 4 additions and 1 deletions

View File

@@ -166,7 +166,7 @@ export default declare((api, options) => {
let patternId;
let node;
if (this.kind === "const") {
if (this.kind === "const" || this.kind === "let") {
patternId = this.scope.generateUidIdentifier(tempId.name);
node = this.buildVariableDeclaration(patternId, tempConditional);
} else {