diff --git a/components/Search.tsx b/components/Search.tsx index e1e6b6f..2e0e4f7 100644 --- a/components/Search.tsx +++ b/components/Search.tsx @@ -61,6 +61,12 @@ const Search: React.FC = () => { }, 1000) return () => { clearTimeout(timeout) + try { + abortController.current?.abort() + abortController.current = null + } catch (e) { + return null + } } }, [query])