From 4fbb31b4dc5e6b8ddeb18dae063e73a2c0d8fa62 Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Sun, 30 Aug 2015 09:59:19 -0700 Subject: [PATCH] Adjust `Set` references to fix the build. --- lodash.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lodash.js b/lodash.js index 5dacb70c5..b8fadaf8c 100644 --- a/lodash.js +++ b/lodash.js @@ -1324,7 +1324,6 @@ var ArrayBuffer = context.ArrayBuffer, Symbol = context.Symbol, Reflect = context.Reflect, - Set = getNative(context, 'Set'), Uint8Array = context.Uint8Array, WeakMap = getNative(context, 'WeakMap'), clearTimeout = context.clearTimeout, @@ -1346,7 +1345,8 @@ nativeMax = Math.max, nativeMin = Math.min, nativeParseInt = context.parseInt, - nativeRandom = Math.random; + nativeRandom = Math.random, + nativeSet = getNative(context, 'Set'); /** Used as references for `-Infinity` and `Infinity`. */ var NEGATIVE_INFINITY = Number.NEGATIVE_INFINITY, @@ -1751,7 +1751,7 @@ function SetCache(values) { var length = values ? values.length : 0; - this.data = { 'hash': nativeCreate(null), 'set': new Set }; + this.data = { 'hash': nativeCreate(null), 'set': new nativeSet }; while (length--) { this.push(values[length]); } @@ -3272,7 +3272,7 @@ * @returns {null|Object} Returns the new cache object if `Set` is supported, else `null`. */ function createCache(values) { - return (nativeCreate && Set) ? new SetCache(values) : null; + return (nativeCreate && nativeSet) ? new SetCache(values) : null; } /**