Revert "don't push array pattern uid if it's a local variable"
This reverts commit 86acc99fb3.
This commit is contained in:
@@ -146,11 +146,9 @@ DestructuringTransformer.prototype.pushArrayPattern = function (pattern, parentI
|
||||
|
||||
var toArray = this.scope.toArray(parentId, count);
|
||||
|
||||
if (!t.isIdentifier(parentId) || !this.scope.hasBinding(parentId.name)) {
|
||||
var _parentId = this.scope.generateUidBasedOnNode(parentId);
|
||||
this.nodes.push(this.buildVariableDeclaration(_parentId, toArray));
|
||||
parentId = _parentId;
|
||||
}
|
||||
var _parentId = this.scope.generateUidBasedOnNode(parentId);
|
||||
this.nodes.push(this.buildVariableDeclaration(_parentId, toArray));
|
||||
parentId = _parentId;
|
||||
|
||||
this.scope.assignTypeGeneric(parentId.name, "Array");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user