From 09b113e0df897830b093ebe5f5fb9fff7a25b21b Mon Sep 17 00:00:00 2001 From: David Walsh Date: Tue, 9 May 2023 07:38:36 -0500 Subject: [PATCH] Fix #19060 - Ensure there's multiple accounts before focusing search (#19062) --- ui/components/multichain/account-list-menu/account-list-menu.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/components/multichain/account-list-menu/account-list-menu.js b/ui/components/multichain/account-list-menu/account-list-menu.js index 9903b8a96..12721f482 100644 --- a/ui/components/multichain/account-list-menu/account-list-menu.js +++ b/ui/components/multichain/account-list-menu/account-list-menu.js @@ -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]);