Include only enumerable symbols in getSymbols result. [closes #2845]

This commit is contained in:
John-David Dalton
2016-11-23 11:26:18 -06:00
parent 2890eabf66
commit 1dddf27a39

View File

@@ -6056,7 +6056,11 @@
* @param {Object} object The object to query.
* @returns {Array} Returns the array of symbols.
*/
var getSymbols = nativeGetSymbols ? overArg(nativeGetSymbols, Object) : stubArray;
var getSymbols = !nativeGetSymbols ? stubArray : function(object) {
return arrayFilter(nativeGetSymbols(object), function(symbol) {
return propertyIsEnumerable.call(object, symbol);
});
};
/**
* Creates an array of the own and inherited enumerable symbols of `object`.