10000 fix bug and bump version · ui-frontend/immutable-js@9b52918 · GitHub
[go: up one dir, main page]

Skip to content

Commit 9b52918

Browse files
committed
fix bug and bump version
1 parent 50578f0 commit 9b52918

File tree

3 files changed

+4
-13
lines changed

3 files changed

+4
-13
lines changed

dist/Vector.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -350,9 +350,9 @@ for(var IndexedSequence____Key in IndexedSequence){if(IndexedSequence.hasOwnProp
350350
var sliceSequence = ____SuperProtoOfIndexedSequence.slice.call(this,begin, end, maintainIndices);
351351
// Optimize the case of vector.slice(b, e).toVector()
352352
if (!maintainIndices && sliceSequence !== this) {
353-
var sequence = this;
354-
var length = sequence.length;
355-
sliceSequence.toVector = function() {return sequence.$Vector_setBounds(
353+
var vector = this;
354+
var length = vector.length;
355+
sliceSequence.toVector = function() {return vector.$Vector_setBounds(
356356
begin < 0 ? Math.max(0, length + begin) : length ? Math.min(length, begin) : begin,
357357
end == null ? length : end < 0 ? Math.max(0, length + end) : length ? Math.min(length, end) : end
358358
);};

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "immutable-data",
3-
"version": "0.3.0",
3+
"version": "0.4.0",
44
"description": "Immutable Data Collections",
55
"homepage": "https://github.com/leebyron/immutable-js",
66
"author": {

src/Sequence.js

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -751,15 +751,6 @@ class ArraySequence extends IndexedSequence {
751751
return this._array;
752752
}
753753

754-
slice(begin, end, maintainIndices) {
755-
var sliceSequence = super.slice();
756-
if (!maintainIndices) {
757-
var array = this._array;
758-
sliceSequence.toArray = () => array.slice(begin, end);
759-
}
760-
return sliceSequence;
761-
}
762-
763754
__iterate(fn, reverse, flipIndices) {
764755
var array = this._array;
765756
var maxIndex = array.length - 1;

0 commit comments

Comments
 (0)
0