4e3f2005f9f14d855de3225772a807b09ed283f9
TASK-ABORT-03: Fix stale abortRef read in .finally() callbacks In useGlobalConfig, useServerSettings, and useJailConfigDetail hooks, the .finally() block was reading abortRef.current instead of using the locally captured controller reference. If load() is called while a fetch is in flight, the previous fetch's .finally() would read the new controller (not aborted) and prematurely clear the loading state while the new fetch is still pending. Changes: - useGlobalConfig.ts: use locally-captured ctrl in .finally() (line 46) - useServerSettings.ts: use locally-captured ctrl in .finally() (line 50) - useJailConfigDetail.ts: use locally-captured ctrl in .finally() (line 47) All three hooks already use ctrl correctly in .then() and .catch() callbacks. Documentation: - Add 'AbortController in Hooks' section to Web-Development.md - Explains the pattern and shows incorrect vs correct examples - Prevents future regressions Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Description
No description provided
Languages
Python
61.2%
TypeScript
24.9%
HTML
8.4%
Markdown
2.5%
Roff
0.9%
Other
2%