diff --git a/packages/ui/src/hooks/useSearchShortcut.jsx b/packages/ui/src/hooks/useSearchShortcut.jsx index 2fc598a0fdb..e768db9401d 100644 --- a/packages/ui/src/hooks/useSearchShortcut.jsx +++ b/packages/ui/src/hooks/useSearchShortcut.jsx @@ -5,6 +5,7 @@ const isMac = getOS() === 'macos' const useSearchShorcut = (inputRef) => { useEffect(() => { + if (!inputRef.current) return const component = inputRef.current const handleKeyDown = (event) => { if ((isMac && event.metaKey && event.key === 'f') || (!isMac && event.ctrlKey && event.key === 'f')) {