1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-10-22 19:26:13 +02:00

metametrics: deprecate flatMap (#14608)

This commit is contained in:
Ariella Vu 2022-05-03 18:17:08 -05:00 committed by GitHub
parent 23e3f52a04
commit f926925b3f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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();
});