Commit 214a19d
committed
fix(queries): forward the abort signal to getFullOrganization
useOrganization destructured `signal` from the queryFn and passed it to
fetchOrganization, which named the parameter `_signal` and never used it — so
the org detail fetch could not be cancelled. Switching orgs rapidly left every
prior request in flight, free to resolve out of order.
Better Auth takes cancellation two ways and both are already used here:
fetchOptions on the params object (session.ts:21) and a second argument
(admin-users.ts:129). Uses the former. This was the only `_signal` under
apps/sim/hooks.
The existing transition test asserted the exact call shape, so it now asserts
intent via objectContaining. Adds a test for the signal itself; it fails
against the old code.1 parent 13259cb commit 214a19d
2 files changed
Lines changed: 16 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
189 | 189 | | |
190 | 190 | | |
191 | 191 | | |
192 | | - | |
193 | | - | |
194 | | - | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
195 | 206 | | |
196 | 207 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
154 | 154 | | |
155 | 155 | | |
156 | 156 | | |
157 | | - | |
| 157 | + | |
158 | 158 | | |
159 | 159 | | |
| 160 | + | |
160 | 161 | | |
161 | 162 | | |
162 | 163 | | |
| |||
0 commit comments