Fix broken lazy reverse

This commit is contained in:
Filip Zawada
2014-11-22 17:23:35 +01:00
parent 7e3dd2b8cc
commit 8f2b5e195e
2 changed files with 27 additions and 0 deletions

View File

@@ -4982,6 +4982,12 @@
* // => [3, 2, 1]
*/
function wrapperReverse() {
var wrapped = this.__wrapped__;
if(wrapped instanceof LazyWrapper) {
return wrapped.reverse();
}
return this.thru(function(value) {
return value.reverse();
});