1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-22 18:00:18 +01:00

metametrics: deprecate flatMap (#14608)

This commit is contained in:
Ariella Vu 2022-05-03 18:17:08 -05:00 committed by ryanml
parent a96d40957b
commit c0957866a9

View File

@ -621,7 +621,9 @@ export default class MetaMetricsController {
*/
_getAllNFTsFlattened = memoize((allCollectibles = {}) => {
return Object.values(allCollectibles)
.flatMap((chainNFTs) => Object.values(chainNFTs))
.reduce((result, chainNFTs) => {
return result.concat(Object.values(chainNFTs));
}, [])
.flat();
});