mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-09 10:27:49 +00:00
Add Map guard to stackSet.
This commit is contained in:
@@ -2122,7 +2122,7 @@
|
|||||||
*/
|
*/
|
||||||
function stackSet(key, value) {
|
function stackSet(key, value) {
|
||||||
var cache = this.__data__;
|
var cache = this.__data__;
|
||||||
if (cache instanceof ListCache && cache.__data__.length == LARGE_ARRAY_SIZE) {
|
if (Map && cache instanceof ListCache && cache.__data__.length == LARGE_ARRAY_SIZE) {
|
||||||
cache = this.__data__ = new MapCache(cache.__data__);
|
cache = this.__data__ = new MapCache(cache.__data__);
|
||||||
}
|
}
|
||||||
cache.set(key, value);
|
cache.set(key, value);
|
||||||
|
|||||||
Reference in New Issue
Block a user