1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-25 20:02:58 +01:00

fix bug in NFT dropdown state management (#13880)

This commit is contained in:
Alex Donesky 2022-03-08 21:06:09 -06:00 committed by GitHub
parent cf46dbf654
commit 1be1cb0c85
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2,6 +2,7 @@ import React, { useEffect } from 'react';
import PropTypes from 'prop-types';
import { useDispatch, useSelector } from 'react-redux';
import { useHistory } from 'react-router-dom';
import { isEqual } from 'lodash';
import Box from '../../ui/box';
import Typography from '../../ui/typography/typography';
import Card from '../../ui/card';
@ -50,7 +51,7 @@ export default function CollectiblesItems({
if (
chainId !== undefined &&
selectedAddress !== undefined &&
previousCollectionKeys !== collectionsKeys &&
!isEqual(previousCollectionKeys, collectionsKeys) &&
(collectiblesDropdownState?.[selectedAddress]?.[chainId] === undefined ||
Object.keys(collectiblesDropdownState?.[selectedAddress]?.[chainId])
.length === 0)