Commit 55a507e
committed
fix(yok): keep hierarchical dispatchers on the owning injector
createHierarchicalCommand registered the synthesized parent - and its
execute path resolved commandsService and errors - through the
module-level global injector instead of the instance it was called on,
so a parent dispatcher leaked onto the global injector whenever a
hierarchical command was registered on any other instance.
The require-ordering guard accidentally depended on that leak: with the
parent now landing on the same instance, it is exempted for synthesized
parents (they exist because a child registered, not because requires ran
out of order), and the else branch mirrors the existing default-command
skip. Net effect: register-then-require orderings that used to throw
'Default commands should be required before child commands' now work;
nothing that worked before changes.1 parent a23a901 commit 55a507e
1 file changed
Lines changed: 15 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
70 | 76 | | |
71 | 77 | | |
72 | 78 | | |
| |||
88 | 94 | | |
89 | 95 | | |
90 | 96 | | |
91 | | - | |
| 97 | + | |
| 98 | + | |
92 | 99 | | |
93 | 100 | | |
94 | 101 | | |
| |||
114 | 121 | | |
115 | 122 | | |
116 | 123 | | |
117 | | - | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
118 | 127 | | |
119 | 128 | | |
120 | 129 | | |
| |||
305 | 314 | | |
306 | 315 | | |
307 | 316 | | |
| 317 | + | |
308 | 318 | | |
309 | 319 | | |
310 | 320 | | |
311 | 321 | | |
312 | 322 | | |
313 | | - | |
| 323 | + | |
314 | 324 | | |
315 | 325 | | |
316 | 326 | | |
| |||
364 | 374 | | |
365 | 375 | | |
366 | 376 | | |
367 | | - | |
| 377 | + | |
368 | 378 | | |
369 | 379 | | |
370 | 380 | | |
| |||
395 | 405 | | |
396 | 406 | | |
397 | 407 | | |
398 | | - | |
| 408 | + | |
399 | 409 | | |
400 | 410 | | |
401 | 411 | | |
| |||
0 commit comments