Skip to content

Commit 66d01cc

Browse files
committed
remove redundant variables in zipWithFactory
1 parent da399c9 commit 66d01cc

File tree

3 files changed

+3
-7
lines changed

3 files changed

+3
-7
lines changed

dist/immutable.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1809,10 +1809,8 @@ function maxCompare(comparator, a, b) {
18091809

18101810
function zipWithFactory(keyIter, zipper, iters, zipAll) {
18111811
var zipSequence = makeSequence(keyIter);
1812-
zipSequence.size = new ArraySeq(iters).map(function (i) { return i.size; }).min();
18131812
var sizes = new ArraySeq(iters).map(function (i) { return i.size; });
1814-
var zipSize = !!zipAll ? sizes.max() : sizes.min();
1815-
zipSequence.size = zipSize;
1813+
zipSequence.size = !!zipAll ? sizes.max() : sizes.min();
18161814

18171815
// Note: this a generic base implementation of __iterate in terms of
18181816
// __iterator which may be more generically useful in the future.

dist/immutable.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Operations.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -785,10 +785,8 @@ function maxCompare(comparator, a, b) {
785785

786786
export function zipWithFactory(keyIter, zipper, iters, zipAll) {
787787
const zipSequence = makeSequence(keyIter);
788-
zipSequence.size = new ArraySeq(iters).map(i => i.size).min();
789788
const sizes = new ArraySeq(iters).map(i => i.size);
790-
const zipSize = !!zipAll ? sizes.max() : sizes.min();
791-
zipSequence.size = zipSize;
789+
zipSequence.size = !!zipAll ? sizes.max() : sizes.min();
792790

793791
// Note: this a generic base implementation of __iterate in terms of
794792
// __iterator which may be more generically useful in the future.

0 commit comments

Comments
 (0)