From e18b577d20f9719f393971260856c1e4ed25e72d Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Tue, 24 May 2016 00:23:21 -0700 Subject: [PATCH] Add `Map` guard to `stackSet`. --- lodash.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lodash.js b/lodash.js index 275c9ee5b..ed59da8ba 100644 --- a/lodash.js +++ b/lodash.js @@ -2122,7 +2122,7 @@ */ function stackSet(key, value) { 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.set(key, value);