From 151e3162639edb6e33162b7e24b28cdf7d8f8bdc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luiz=20Am=C3=A9rico?= Date: Wed, 5 Dec 2018 02:10:48 -0200 Subject: [PATCH] Remove check for existence of getOwnPropertySymbols (#4102) --- .internal/getSymbols.js | 2 +- .internal/getSymbolsIn.js | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/.internal/getSymbols.js b/.internal/getSymbols.js index b7592fbdc..a89d7497b 100644 --- a/.internal/getSymbols.js +++ b/.internal/getSymbols.js @@ -13,7 +13,7 @@ const nativeGetSymbols = Object.getOwnPropertySymbols * @param {Object} object The object to query. * @returns {Array} Returns the array of symbols. */ -const getSymbols = !nativeGetSymbols ? () => [] : (object) => { +function getSymbols (object) { if (object == null) { return [] } diff --git a/.internal/getSymbolsIn.js b/.internal/getSymbolsIn.js index 0c4638d2f..a299603fd 100644 --- a/.internal/getSymbolsIn.js +++ b/.internal/getSymbolsIn.js @@ -1,8 +1,5 @@ import getSymbols from './getSymbols.js' -/* Built-in method references for those with the same name as other `lodash` methods. */ -const nativeGetSymbols = Object.getOwnPropertySymbols - /** * Creates an array of the own and inherited enumerable symbols of `object`. * @@ -10,7 +7,7 @@ const nativeGetSymbols = Object.getOwnPropertySymbols * @param {Object} object The object to query. * @returns {Array} Returns the array of symbols. */ -const getSymbolsIn = !nativeGetSymbols ? () => [] : (object) => { +function getSymbolsIn (object) { const result = [] while (object) { result.push(...getSymbols(object))