Commit 12107db
committed
fix(angular-virtual): capture _didMount cleanup to remove scroll/resize listeners on destroy
afterNextRender discarded the teardown function returned by _didMount(), so observeWindowOffset's scroll and resize listeners were never unregistered.
Post-destroy onChange callbacks kept mutating virtualizerSignal, corrupting Angular's reactive graph and causing a "Cannot read properties of null (reading 'flags')" crash on next component creation.
Also fixes the cleanup variable type annotation.1 parent 97a204d commit 12107db
File tree
2 files changed
+11
-2
lines changed- .changeset
- packages/angular-virtual/src
2 files changed
+11
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
73 | | - | |
74 | | - | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
75 | 79 | | |
76 | 80 | | |
77 | 81 | | |
| |||
0 commit comments