From ee5718003baf13ed727096e7e970c248fe2e5614 Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Fri, 27 May 2016 13:46:00 -0700 Subject: [PATCH] Simplify `getSymbols` fallback. --- lodash.js | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/lodash.js b/lodash.js index fc8785448..b77bd611f 100644 --- a/lodash.js +++ b/lodash.js @@ -5461,16 +5461,11 @@ * @param {Object} object The object to query. * @returns {Array} Returns the array of symbols. */ - function getSymbols(object) { + var getSymbols = !getOwnPropertySymbols ? stubArray : function(object) { // Coerce `object` to an object to avoid non-object errors in V8. // See https://bugs.chromium.org/p/v8/issues/detail?id=3443 for more details. return getOwnPropertySymbols(Object(object)); - } - - // Fallback for IE < 11. - if (!getOwnPropertySymbols) { - getSymbols = stubArray; - } + }; /** * Creates an array of the own and inherited enumerable symbol properties