metametrics: deprecate flatMap (#14608)

feature/default_network_editable
Ariella Vu 3 years ago committed by GitHub
parent 23e3f52a04
commit f926925b3f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      app/scripts/controllers/metametrics.js

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

Loading…
Cancel
Save