1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-22 18:00:18 +01:00

Fix a typo made comparing previous prop (#7628)

The prop `prevIsAccountMenuOpen` was referenced in `prevProps`, despite
it not existing. It seems clear from the context that the intention
was to check the `isAccountMenuOpen` prop from `prevProps`, and name
the local variable `prevIsAccountMenuOpen`.
This commit is contained in:
Mark Stacey 2019-12-03 15:16:59 -04:00 committed by GitHub
parent f519fa1ed3
commit b4fd7aea32
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -29,7 +29,6 @@ export default class AccountMenu extends PureComponent {
history: PropTypes.object,
identities: PropTypes.object,
isAccountMenuOpen: PropTypes.bool,
prevIsAccountMenuOpen: PropTypes.bool,
keyrings: PropTypes.array,
lockMetamask: PropTypes.func,
selectedAddress: PropTypes.string,
@ -45,7 +44,7 @@ export default class AccountMenu extends PureComponent {
}
componentDidUpdate (prevProps) {
const { prevIsAccountMenuOpen } = prevProps
const { isAccountMenuOpen: prevIsAccountMenuOpen } = prevProps
const { isAccountMenuOpen } = this.props
if (!prevIsAccountMenuOpen && isAccountMenuOpen) {