From 2e2bd0fce5ca48f5b2646409c727f524c0d35dc6 Mon Sep 17 00:00:00 2001 From: David Walsh Date: Mon, 27 Sep 2021 17:40:05 -0500 Subject: [PATCH] Prevent fox mesh JSON warning (#12200) * Prevent fox mesh JSON warning * Update ui/helpers/utils/build-types.js Co-authored-by: Mark Stacey * Fix lint Co-authored-by: Mark Stacey --- ui/helpers/utils/build-types.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ui/helpers/utils/build-types.js b/ui/helpers/utils/build-types.js index d6ec658f8..37b4c139d 100644 --- a/ui/helpers/utils/build-types.js +++ b/ui/helpers/utils/build-types.js @@ -20,7 +20,10 @@ export function isBeta() { // the current metamask version (i.e. main, beta, etc.) export function getBuildSpecificAsset(assetName) { const buildType = process.env.METAMASK_BUILD_TYPE; - if (!assetList[buildType]?.[assetName]) { + if ( + !assetList[buildType] || + !Object.keys(assetList[buildType]).includes(assetName) + ) { console.warn( `Cannot find asset for build ${buildType}: ${assetName}, returning main build asset`, );