From cb472edfe425ed5a558bb5349b6f8bacb3f97d06 Mon Sep 17 00:00:00 2001 From: Mark Stacey Date: Tue, 3 Dec 2019 15:16:59 -0400 Subject: [PATCH] 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`. --- ui/app/components/app/account-menu/account-menu.component.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ui/app/components/app/account-menu/account-menu.component.js b/ui/app/components/app/account-menu/account-menu.component.js index 1b81e33a26b9..6cb2aa4b884c 100644 --- a/ui/app/components/app/account-menu/account-menu.component.js +++ b/ui/app/components/app/account-menu/account-menu.component.js @@ -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, @@ -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) {