Skip to content

Commit

Permalink
Fix a typo made comparing previous prop (#7628)
Browse files Browse the repository at this point in the history
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`.
  • Loading branch information
Gudahtt committed Dec 5, 2019
1 parent f72070a commit cb472ed
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions ui/app/components/app/account-menu/account-menu.component.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,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,
Expand All @@ -42,7 +41,7 @@ export default class AccountMenu extends PureComponent {
}

componentDidUpdate (prevProps) {
const { prevIsAccountMenuOpen } = prevProps
const { isAccountMenuOpen: prevIsAccountMenuOpen } = prevProps
const { isAccountMenuOpen } = this.props

if (!prevIsAccountMenuOpen && isAccountMenuOpen) {
Expand Down

0 comments on commit cb472ed

Please sign in to comment.