Ensure commit and reverse track __chain__` settings. [closes #958]

This commit is contained in:
jdalton
2015-02-11 08:29:01 -08:00
parent 37f711d72a
commit c44cd76c5a
2 changed files with 24 additions and 2 deletions

View File

@@ -5570,7 +5570,7 @@
* // => [1, 2, 3]
*/
function wrapperCommit() {
return new LodashWrapper(this.value());
return new LodashWrapper(this.value(), this.__chain__);
}
/**
@@ -5638,7 +5638,7 @@
if (this.__actions__.length) {
value = new LazyWrapper(this);
}
return new LodashWrapper(value.reverse());
return new LodashWrapper(value.reverse(), this.__chain__);
}
return this.thru(function(value) {
return value.reverse();