mirror of
https://github.com/koreanbots/core.git
synced 2025-12-15 14:10:22 +00:00
chore: abort on state change
This commit is contained in:
parent
f9289dd6c7
commit
8f4b431ee3
@ -61,6 +61,12 @@ const Search: React.FC = () => {
|
||||
}, 1000)
|
||||
return () => {
|
||||
clearTimeout(timeout)
|
||||
try {
|
||||
abortController.current?.abort()
|
||||
abortController.current = null
|
||||
} catch (e) {
|
||||
return null
|
||||
}
|
||||
}
|
||||
}, [query])
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user