File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
packages/ui/src/lib/components Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 164164 let i = start ;
165165
166166 while (i < chunks .length ) {
167- if (rows ?. [i - start ]) {
167+ if (! rows ! [i - start ]) {
168168 end = i + 1 ;
169169 bottomPadding = sumHeights (end , heightMap .length );
170170 await tick (); // render the newly visible row
181181 }
182182
183183 async function updateStartIndexBackwards(): Promise <number > {
184- if (! viewport || ! rows ) return 0 ;
184+ if (! viewport ) return 0 ;
185185
186186 let accumulatedHeight = 0 ;
187187 let i = end - 1 ;
192192 await tick (); // Wait for the chunk to render
193193
194194 // Now measure the actual rendered height
195- const rowElement = rows [0 ]; // First row in the visible set
195+ const rowElement = rows ! [0 ]; // First row in the visible set
196196 const rowHeight = (rowElement as HTMLElement )?.offsetHeight || FALLBACK_HEIGHT ;
197197 heightMap [i ] = rowHeight ;
198198
249249 if (start < oldStart ) {
250250 await tick ();
251251 const cachedHeight = heightMap [start ] || FALLBACK_HEIGHT ;
252- const realHeight = (rows [0 ] as HTMLElement | undefined )? .offsetHeight ?? 0 ;
252+ const realHeight = (rows [0 ] as HTMLElement ) .offsetHeight ;
253253 const diff = realHeight - cachedHeight ;
254254 if (diff !== 0 ) {
255255 viewport .scrollBy ({ top: diff });
You can’t perform that action at this time.
0 commit comments