Skip to content

Commit 2f7679f

Browse files
committed
Fix regression
1 parent c28a14c commit 2f7679f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/components/RecycleList.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ export default {
204204
h = heights[i].accumulator
205205
if (h < scroll.top) {
206206
a = i
207-
} else if (i < count && heights[i + 1].accumulator > scroll.top) {
207+
} else if (i < count - 1 && heights[i + 1].accumulator > scroll.top) {
208208
b = i
209209
}
210210
i = ~~((a + b) / 2)

src/components/VirtualScroller.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ export default {
201201
h = heights[i].accumulator
202202
if (h < scrollTop) {
203203
a = i
204-
} else if (i < l && heights[i + 1].accumulator > scrollTop) {
204+
} else if (i < l - 1 && heights[i + 1].accumulator > scrollTop) {
205205
b = i
206206
}
207207
i = ~~((a + b) / 2)

0 commit comments

Comments
 (0)