Skip to content

Commit

Permalink
Merge pull request #302 from Leeingnyo/fix/preload-bug
Browse files Browse the repository at this point in the history
Fix preload bug
  • Loading branch information
hkalexling authored May 13, 2022
2 parents eac274a + 5f59b7e commit 883e01b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion public/js/reader.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ const readerComponent = () => {

// Preload Images
this.preloadLookahead = +(localStorage.getItem('preloadLookahead') ?? 3);
const limit = Math.min(page + this.preloadLookahead, this.items.length + 1);
const limit = Math.min(page + this.preloadLookahead, this.items.length);
for (let idx = page + 1; idx <= limit; idx++) {
this.preloadImage(this.items[idx - 1].url);
}
Expand Down

0 comments on commit 883e01b

Please sign in to comment.