1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 01:39:44 +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 GitHub
parent d3f7464333
commit 2e2bd0fce5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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