fix Incorrect destructuring compilation of `for (let [[x] = [1… (#11360)
This commit is contained in:
parent
e3ad798a24
commit
ca096c56aa
@ -166,7 +166,7 @@ export default declare((api, options) => {
|
|||||||
let patternId;
|
let patternId;
|
||||||
let node;
|
let node;
|
||||||
|
|
||||||
if (this.kind === "const") {
|
if (this.kind === "const" || this.kind === "let") {
|
||||||
patternId = this.scope.generateUidIdentifier(tempId.name);
|
patternId = this.scope.generateUidIdentifier(tempId.name);
|
||||||
node = this.buildVariableDeclaration(patternId, tempConditional);
|
node = this.buildVariableDeclaration(patternId, tempConditional);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@ -0,0 +1,2 @@
|
|||||||
|
for (let [[x] = [1]] = []; ; ) {
|
||||||
|
}
|
||||||
@ -0,0 +1 @@
|
|||||||
|
for (var _ref = [], _ref$ = _ref[0], _ref$2 = _ref$ === void 0 ? [1] : _ref$, _ref$3 = babelHelpers.slicedToArray(_ref$2, 1), x = _ref$3[0];;) {}
|
||||||
Loading…
x
Reference in New Issue
Block a user