From c0957866a9a5213d98881adb9c6432a27535001d Mon Sep 17 00:00:00 2001 From: Ariella Vu <20778143+digiwand@users.noreply.github.com> Date: Tue, 3 May 2022 18:17:08 -0500 Subject: [PATCH] metametrics: deprecate flatMap (#14608) --- app/scripts/controllers/metametrics.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/scripts/controllers/metametrics.js b/app/scripts/controllers/metametrics.js index 9018b533d..856461a57 100644 --- a/app/scripts/controllers/metametrics.js +++ b/app/scripts/controllers/metametrics.js @@ -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(); });