Make LARGE_ARRAY_SIZE check in stackSet align with others.

This commit is contained in:
John-David Dalton
2016-06-07 08:33:48 -07:00
parent efb4db2b86
commit b5842314b4
2 changed files with 2 additions and 2 deletions

View File

@@ -2167,7 +2167,7 @@
var cache = this.__data__; var cache = this.__data__;
if (cache instanceof ListCache) { if (cache instanceof ListCache) {
var pairs = cache.__data__; var pairs = cache.__data__;
if (!Map || pairs.length < LARGE_ARRAY_SIZE) { if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {
pairs.push([key, value]); pairs.push([key, value]);
return this; return this;
} }

View File

@@ -1026,7 +1026,7 @@
var largeStack = new mapCaches.Stack(pairs), var largeStack = new mapCaches.Stack(pairs),
length = pairs ? pairs.length : 0; length = pairs ? pairs.length : 0;
lodashStable.times(LARGE_ARRAY_SIZE - length + 1, function() { lodashStable.times(LARGE_ARRAY_SIZE - length, function() {
largeStack.set({}, {}); largeStack.set({}, {});
}); });