1
0
Fork 0
mirror of https://github.com/overleaf/overleaf.git synced 2025-04-11 09:54:02 +00:00

Merge pull request from overleaf/td-history-infinite-scroll-fix

Fix bug in infinite scrolling in history view

GitOrigin-RevId: ae71e96a17197451ae583e5614adbbd9dda93ee0
This commit is contained in:
Jessica Lawshe 2023-04-27 08:56:23 -05:00 committed by Copybot
parent 8be17cdb37
commit afb810c2a1

View file

@ -42,7 +42,7 @@ function limitUpdates(
let { updates, nextBeforeTimestamp } = response
const maxBatchSize = maxBatchSizeParam ? parseInt(maxBatchSizeParam, 10) : 0
const delay = delayParam ? parseInt(delayParam, 10) : 0
if (maxBatchSize > 0 && updates) {
if (maxBatchSize > 0 && updates.length > maxBatchSize) {
updates = updates.slice(0, maxBatchSize)
nextBeforeTimestamp = updates[updates.length - 1].fromV
}