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

Fix #19060 - Ensure there's multiple accounts before focusing search (#19062)

This commit is contained in:
David Walsh 2023-05-09 07:38:36 -05:00 committed by GitHub
parent 124678e701
commit 09b113e0df
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -66,7 +66,7 @@ export const AccountListMenu = ({ onClose }) => {
// Focus on the search box when the popover is opened
useEffect(() => {
if (inputRef.current) {
inputRef.current.rootNode.querySelector('input[type=search]').focus();
inputRef.current.rootNode.querySelector('input[type=search]')?.focus();
}
}, [inputRef]);