1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00

Prevent fox mesh JSON warning (#12200)

* Prevent fox mesh JSON warning

* Update ui/helpers/utils/build-types.js

Co-authored-by: Mark Stacey <markjstacey@gmail.com>

* Fix lint

Co-authored-by: Mark Stacey <markjstacey@gmail.com>
This commit is contained in:
David Walsh 2021-09-27 17:40:05 -05:00 committed by ryanml
parent afede01717
commit 7810cb3cdf

View File

@ -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`,
);