Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
client: Restore spinner even when the event has been cancelled
The aborting short circuit has been introduced in 28d27f3 It can happen that the request is cancelled by another request but the second request will use `setLoadingState` instead of `setMoreLoadingState` so `moreLoadingState` will be stuck on `LOADING`. Not sure if it this cannot introduce a race if the same state is used in both requests. Tried testing with {let a = new AbortController(); let f = fetch('wait.php?seconds=3', {signal: a.signal}); f.then(r => console.log(r, a)); setTimeout(() => {a.abort(); f.then((r) => console.log(r, a.signal))}, 100);}
- Loading branch information