1
0
Fork 0
mirror of https://github.com/futurepress/epub.js.git synced 2025-10-04 15:09:16 +02:00
This commit is contained in:
Mikkel Vester Petersen 2019-10-24 15:12:09 +02:00
parent f5d55e039d
commit 8f83c91aaa

View file

@ -221,7 +221,7 @@ class Locations {
var completed = new defer(); var completed = new defer();
var locations = this.parseWords(contents, section, wordCount, startCfi); var locations = this.parseWords(contents, section, wordCount, startCfi);
var remainingCount = count - this._locationsWords.length; var remainingCount = count - this._locationsWords.length;
this._locationsWords = this._locationsWords.concat(locations.length <= count ? locations.slice(0, remainingCount) : locations); this._locationsWords = this._locationsWords.concat(locations.length >= count ? locations.slice(0, remainingCount) : locations);
section.unload(); section.unload();