Skip to content

Commit a14a66a

Browse files
committed
fix issues where third arg isnt always parent seq
1 parent 3fb7926 commit a14a66a

File tree

3 files changed

+35
-25
lines changed

3 files changed

+35
-25
lines changed

dist/Immutable.js

+9-3
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ var $Sequence = Sequence;
359359
if (sequence._cache) {
360360
return $Sequence(sequence._cache);
361361
}
362-
var entriesSequence = sequence.map(entryMapper).valueSeq();
362+
var entriesSequence = sequence.toKeyedSeq().map(entryMapper).valueSeq();
363363
entriesSequence.fromEntries = (function() {
364364
return sequence;
365365
});
@@ -488,10 +488,16 @@ var $Sequence = Sequence;
488488
return mappedSequence;
489489
},
490490
mapKeys: function(mapper, thisArg) {
491-
return this.flip().map(mapper, thisArg).flip();
491+
var $__0 = this;
492+
return this.flip().map((function(k, v) {
493+
return mapper.call(thisArg, k, v, $__0);
494+
})).flip();
492495
},
493496
mapEntries: function(mapper, thisArg) {
494-
return this.entrySeq().map(mapper, thisArg).fromEntrySeq();
497+
var $__0 = this;
498+
return this.entrySeq().map((function(entry, index) {
499+
return mapper.call(thisArg, entry, index, $__0);
500+
})).fromEntrySeq();
495501
},
496502
filter: function(predicate, thisArg) {
497503
return filterFactory(this, predicate, thisArg, true);

0 commit comments

Comments
 (0)