You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
var arr = [1, 2, 3];
var arr2 = _.chain(arr)
.slice()
.reverse()
.value();
console.log('arr2: ', arr2); // [3, 2, 1]
console.log('arr: ', arr); // [3, 2, 1]
// in 3.9.3 and prior to it 'console.log(arr);' would return [1, 2, 3]. The initial array would be untouched.
First i'd like to say, that it is unintuitive, undocumented(nothing in the changelog) and it broke a part of our project. Supposing, that the change was intentional(short fusion), the question is: is there a way to clone an array on purpose, considering that _.clone and _.cloneDeep aren't chainable?
Thank you!
The text was updated successfully, but these errors were encountered:
Hello!
In 3.10.0:
First i'd like to say, that it is unintuitive, undocumented(nothing in the changelog) and it broke a part of our project. Supposing, that the change was intentional(short fusion), the question is: is there a way to clone an array on purpose, considering that
_.clone
and_.cloneDeep
aren't chainable?Thank you!
The text was updated successfully, but these errors were encountered: