DEV Community

Discussion on: Build your own virtual scroll - Part II

Collapse
 
trumbitta profile image
William Ghelfi • Edited

I fixed like this:

// endNode = Math.min(itemCount - 1, endNode + renderAhead);
endNode = Math.min(itemCount, endNode + renderAhead);

But I'm not sure any side-effect would show up or not in a real world scenario.
Thoughts?