mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-15 21:27: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__;
|
||||
if (cache instanceof ListCache) {
|
||||
var pairs = cache.__data__;
|
||||
if (!Map || pairs.length < LARGE_ARRAY_SIZE) {
|
||||
if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {
|
||||
pairs.push([key, value]);
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -1026,7 +1026,7 @@
|
||||
var largeStack = new mapCaches.Stack(pairs),
|
||||
length = pairs ? pairs.length : 0;
|
||||
|
||||
lodashStable.times(LARGE_ARRAY_SIZE - length + 1, function() {
|
||||
lodashStable.times(LARGE_ARRAY_SIZE - length, function() {
|
||||
largeStack.set({}, {});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user