From 5e15ac5a7c9a8798d2e9f2c5ae1f82a32fa4ae1b Mon Sep 17 00:00:00 2001 From: LuckyFBB <976060700@qq.com> Date: Sat, 10 Oct 2026 11:42:49 +0800 Subject: [PATCH] fix(uselist): prevent race condition in request fix #668 --- src/useList/index.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/useList/index.ts b/src/useList/index.ts index 3b923899e..59912cc72 100644 --- a/src/useList/index.ts +++ b/src/useList/index.ts @@ -75,6 +75,7 @@ export default function useList, P extends Record< setLoading(true); fetcher(raw) .then(({ data, total }) => { + if (lastRequestId.current !== requestId) return; setData(data); setTotal(total); })