Commit 8875221
fix(cdk/scrolling): Prevents NaN being returned as firstVisibleIndex. (#21505)
When firstVisibleIndex divides by zero, which can happen when the page
is built and loaded dynamically; the NaN result will be used in other calculations.
This then throws off things like the `newRange.start` value also returning NaN, breaking the plugin.
(cherry picked from commit 390afca)1 parent 819e2f8 commit 8875221
1 file changed
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
128 | | - | |
| 128 | + | |
| 129 | + | |
129 | 130 | | |
130 | 131 | | |
131 | 132 | | |
| |||
0 commit comments