Commit d293fe0
fix(core/hooks): call cleanup when unmount occurs before async effect resolves
The cleanup function returned from the async effect was silently lost
if the component unmounted before the Promise resolved. Added an
`isCleaned` flag so the cleanup is invoked immediately after the
Promise settles in that case.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent 2a901bb commit d293fe0
1 file changed
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
30 | 34 | | |
31 | 35 | | |
32 | 36 | | |
| 37 | + | |
33 | 38 | | |
34 | 39 | | |
35 | 40 | | |
| |||
0 commit comments