Commit 81cc05d
Fix renderSingleTask error swallowing on sequential calls
The setImmediate deferral of unmountInk() introduced a race condition
when renderSingleTask is called sequentially: the first instance's
deferred unmountInk() can fire after the second instance starts,
causing the second waitUntilExit() to resolve prematurely. If the
second task then throws, the error is silently swallowed because
render().catch(reject) never fires.
Fix: add onError callback to SingleTask (mirroring onComplete) so
errors are propagated directly via the callback rather than relying
on waitUntilExit() rejection, which is unreliable across sequential
ink renders.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent 78d771a commit 81cc05d
2 files changed
Lines changed: 5 additions & 3 deletions
Lines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
16 | | - | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
41 | 42 | | |
42 | 43 | | |
43 | 44 | | |
| 45 | + | |
44 | 46 | | |
45 | 47 | | |
46 | | - | |
| 48 | + | |
47 | 49 | | |
48 | 50 | | |
49 | 51 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
522 | 522 | | |
523 | 523 | | |
524 | 524 | | |
525 | | - | |
| 525 | + | |
526 | 526 | | |
527 | 527 | | |
528 | 528 | | |
| |||
0 commit comments