Commit 93080a3
fix: return plugin-injected functions directly from container instead of wrapping in non-callable Proxy
The 4.x ESM migration changed Container.support(name) to always go through
the proxy, which wraps values in lazyLoad() — a Proxy designed for page
objects (property access), not callable functions. This broke the auth
plugin's loginAs/login injection since the returned Proxy has no apply trap.
Also fixes missing-key detection in inject.js (was never firing because
lazyLoad always returns a truthy Proxy).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent c5572aa commit 93080a3
3 files changed
Lines changed: 20 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
150 | 150 | | |
151 | 151 | | |
152 | 152 | | |
153 | | - | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
154 | 156 | | |
155 | 157 | | |
156 | 158 | | |
| |||
600 | 602 | | |
601 | 603 | | |
602 | 604 | | |
| 605 | + | |
| 606 | + | |
603 | 607 | | |
604 | 608 | | |
605 | 609 | | |
| |||
614 | 618 | | |
615 | 619 | | |
616 | 620 | | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
617 | 624 | | |
618 | 625 | | |
619 | 626 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
| 33 | + | |
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
287 | 287 | | |
288 | 288 | | |
289 | 289 | | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
290 | 301 | | |
291 | 302 | | |
292 | 303 | | |
| |||
0 commit comments