metametrics: deprecate flatMap (#14608)

feature/default_network_editable
Ariella Vu 3 years ago committed by ryanml
parent a96d40957b
commit c0957866a9
  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