Commit 91dcebc
committed
fix(panels): guard removeEventListener against null _onResizeDebounced
Dropping the ?? this.ensureCorrectZones fallback in f9d6ed4 passed
_onResizeDebounced (which can be null) directly to removeEventListener.
That broke typecheck (TS2769) because removeEventListener does not
accept null.
Guard both calls with an if so the listener is only removed when we
actually have one registered. destroy() keeps the optional-chained
cancel() + null assignment to satisfy the source-level wiring test.
Verified: typecheck clean, 12/12 tests pass.1 parent 7413429 commit 91dcebc
1 file changed
Lines changed: 7 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
417 | 417 | | |
418 | 418 | | |
419 | 419 | | |
420 | | - | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
421 | 423 | | |
422 | 424 | | |
423 | 425 | | |
| |||
1688 | 1690 | | |
1689 | 1691 | | |
1690 | 1692 | | |
1691 | | - | |
1692 | | - | |
| 1693 | + | |
| 1694 | + | |
| 1695 | + | |
| 1696 | + | |
1693 | 1697 | | |
1694 | 1698 | | |
1695 | 1699 | | |
| |||
0 commit comments