[fix] negative current word values
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Evan Reichard 2023-10-30 19:36:04 -04:00
parent aacf5a7195
commit 20560ed246

View File

@ -677,6 +677,7 @@ class EBookReader {
// Update Current Word // Update Current Word
let pageWords = await this.getVisibleWordCount(); let pageWords = await this.getVisibleWordCount();
this.bookState.currentWord -= pageWords; this.bookState.currentWord -= pageWords;
if (this.bookState.currentWord < 0) this.bookState.currentWord = 0;
// Reset Read Timer // Reset Read Timer
this.bookState.pageStart = Date.now(); this.bookState.pageStart = Date.now();