Skip to content

Conversation

@zdenko
Copy link
Collaborator

@zdenko zdenko commented Mar 5, 2018

Fixes #5004.

[@all_but_last_two... , @penultimate, @last] = array

###
[...this.all_but_last_two] = array, [this.penultimate, this.last] = splice.call(this.all_but_last_two, -2);
###

[obj.first , obj.middle..., obj.last] = array

###
[obj.first, ...obj.middle] = array, [obj.last] = splice.call(obj.middle, -1);
###

@GeoffreyBooth GeoffreyBooth merged commit 4c0363f into jashkenas:master Mar 7, 2018
@GeoffreyBooth GeoffreyBooth mentioned this pull request Mar 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Nodes: array destructuring is broken in some cases and leads to TypeError

2 participants