Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit d218f90

Browse files
author
Luke Barnard
committed
Fix infinite pagination/glitches with pagination
I think this was being caused by a bug introduced in 47f29b that meant that `backwards` was actually being used as `forwards`.
1 parent 880a484 commit d218f90

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/components/structures/ScrollPanel.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ module.exports = React.createClass({
345345
//
346346
// If backwards is true, we unpaginate (remove) tiles from the back (top).
347347
for (let i = 0; i < tiles.length; i++) {
348-
const tile = tiles[backwards ? tiles.length - 1 - i : i];
348+
const tile = tiles[backwards ? i : tiles.length - 1 - i];
349349
// Subtract height of tile as if it were unpaginated
350350
excessHeight -= tile.clientHeight;
351351
// The tile may not have a scroll token, so guard it

0 commit comments

Comments
 (0)