Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 1c4ce56

Browse filesBrowse files
deploy: 23daf26
1 parent 60fff51 commit 1c4ce56
Copy full SHA for 1c4ce56

File tree

3 files changed

+11
-11
lines changed
Filter options

3 files changed

+11
-11
lines changed

‎dist/immutable.es.js

Copy file name to clipboardExpand all lines: dist/immutable.es.js
+5-5Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1437,16 +1437,16 @@ function sliceFactory(collection, begin, end, useKeys) {
14371437
return collection;
14381438
}
14391439

1440-
var resolvedBegin = resolveBegin(begin, originalSize);
1441-
var resolvedEnd = resolveEnd(end, originalSize);
1442-
1443-
// begin or end will be NaN if they were provided as negative numbers and
1440+
// begin or end can not be resolved if they were provided as negative numbers and
14441441
// this collection's size is unknown. In that case, cache first so there is
14451442
// a known size and these do not resolve to NaN.
1446-
if (resolvedBegin !== resolvedBegin || resolvedEnd !== resolvedEnd) {
1443+
if (typeof originalSize === 'undefined' && (begin < 0 || end < 0)) {
14471444
return sliceFactory(collection.toSeq().cacheResult(), begin, end, useKeys);
14481445
}
14491446

1447+
var resolvedBegin = resolveBegin(begin, originalSize);
1448+
var resolvedEnd = resolveEnd(end, originalSize);
1449+
14501450
// Note: resolvedEnd is undefined when the original sequence's length is
14511451
// unknown and this slice did not supply an end and should contain all
14521452
// elements after resolvedBegin.

‎dist/immutable.js

Copy file name to clipboardExpand all lines: dist/immutable.js
+5-5Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1443,16 +1443,16 @@
14431443
return collection;
14441444
}
14451445

1446-
var resolvedBegin = resolveBegin(begin, originalSize);
1447-
var resolvedEnd = resolveEnd(end, originalSize);
1448-
1449-
// begin or end will be NaN if they were provided as negative numbers and
1446+
// begin or end can not be resolved if they were provided as negative numbers and
14501447
// this collection's size is unknown. In that case, cache first so there is
14511448
// a known size and these do not resolve to NaN.
1452-
if (resolvedBegin !== resolvedBegin || resolvedEnd !== resolvedEnd) {
1449+
if (typeof originalSize === 'undefined' && (begin < 0 || end < 0)) {
14531450
return sliceFactory(collection.toSeq().cacheResult(), begin, end, useKeys);
14541451
}
14551452

1453+
var resolvedBegin = resolveBegin(begin, originalSize);
1454+
var resolvedEnd = resolveEnd(end, originalSize);
1455+
14561456
// Note: resolvedEnd is undefined when the original sequence's length is
14571457
// unknown and this slice did not supply an end and should contain all
14581458
// elements after resolvedBegin.

‎dist/immutable.min.js

Copy file name to clipboardExpand all lines: dist/immutable.min.js
+1-1Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.