mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-12 03:47:50 +00:00
Make LARGE_ARRAY_SIZE check in stackSet align with others.
This commit is contained in:
@@ -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;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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({}, {});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user