We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9e5e06c commit 856100aCopy full SHA for 856100a
src/index.js
@@ -91,8 +91,9 @@ export function useVirtual({
91
92
const virtualItems = React.useMemo(() => {
93
const virtualItems = []
94
+ const end = Math.min(range.end, measurements.length - 1)
95
- for (let i = range.start; i <= range.end; i++) {
96
+ for (let i = range.start; i <= end; i++) {
97
const measurement = measurements[i]
98
99
const item = {
0 commit comments