summaryrefslogtreecommitdiff
path: root/tools/eslint/node_modules/lodash/_stackSet.js
diff options
context:
space:
mode:
Diffstat (limited to 'tools/eslint/node_modules/lodash/_stackSet.js')
-rw-r--r--tools/eslint/node_modules/lodash/_stackSet.js12
1 files changed, 7 insertions, 5 deletions
diff --git a/tools/eslint/node_modules/lodash/_stackSet.js b/tools/eslint/node_modules/lodash/_stackSet.js
index 604918376c..b790ac5f41 100644
--- a/tools/eslint/node_modules/lodash/_stackSet.js
+++ b/tools/eslint/node_modules/lodash/_stackSet.js
@@ -16,16 +16,18 @@ var LARGE_ARRAY_SIZE = 200;
* @returns {Object} Returns the stack cache instance.
*/
function stackSet(key, value) {
- var cache = this.__data__;
- if (cache instanceof ListCache) {
- var pairs = cache.__data__;
+ var data = this.__data__;
+ if (data instanceof ListCache) {
+ var pairs = data.__data__;
if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {
pairs.push([key, value]);
+ this.size = ++data.size;
return this;
}
- cache = this.__data__ = new MapCache(pairs);
+ data = this.__data__ = new MapCache(pairs);
}
- cache.set(key, value);
+ data.set(key, value);
+ this.size = data.size;
return this;
}