diff --git a/lib/babel/transformation/transformers/es6/destructuring.js b/lib/babel/transformation/transformers/es6/destructuring.js index 495da452bc..58b9f2ba31 100644 --- a/lib/babel/transformation/transformers/es6/destructuring.js +++ b/lib/babel/transformation/transformers/es6/destructuring.js @@ -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");