mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
fix bug in NFT dropdown state management (#13880)
This commit is contained in:
parent
cf46dbf654
commit
1be1cb0c85
@ -2,6 +2,7 @@ import React, { useEffect } from 'react';
|
|||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import { useDispatch, useSelector } from 'react-redux';
|
import { useDispatch, useSelector } from 'react-redux';
|
||||||
import { useHistory } from 'react-router-dom';
|
import { useHistory } from 'react-router-dom';
|
||||||
|
import { isEqual } from 'lodash';
|
||||||
import Box from '../../ui/box';
|
import Box from '../../ui/box';
|
||||||
import Typography from '../../ui/typography/typography';
|
import Typography from '../../ui/typography/typography';
|
||||||
import Card from '../../ui/card';
|
import Card from '../../ui/card';
|
||||||
@ -50,7 +51,7 @@ export default function CollectiblesItems({
|
|||||||
if (
|
if (
|
||||||
chainId !== undefined &&
|
chainId !== undefined &&
|
||||||
selectedAddress !== undefined &&
|
selectedAddress !== undefined &&
|
||||||
previousCollectionKeys !== collectionsKeys &&
|
!isEqual(previousCollectionKeys, collectionsKeys) &&
|
||||||
(collectiblesDropdownState?.[selectedAddress]?.[chainId] === undefined ||
|
(collectiblesDropdownState?.[selectedAddress]?.[chainId] === undefined ||
|
||||||
Object.keys(collectiblesDropdownState?.[selectedAddress]?.[chainId])
|
Object.keys(collectiblesDropdownState?.[selectedAddress]?.[chainId])
|
||||||
.length === 0)
|
.length === 0)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user