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`.
feature/default_network_editable
Mark Stacey 5 years ago committed by GitHub
parent f519fa1ed3
commit b4fd7aea32
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      ui/app/components/app/account-menu/account-menu.component.js

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

Loading…
Cancel
Save