mirror of
https://github.com/john-okeefe/foliate-js.git
synced 2026-10-21 22:49:51 -04:00
MOBI: fix duplicated anchors
This commit is contained in:
1 parent
750458d4b7
commit
af0050aba7
1 file changed
+2
-2
@@ -725,9 +725,9 @@ class MOBI6 {
|
||||
// which will be used to insert anchor elements
|
||||
// because only then can they be referenced in the DOM
|
||||
this.#fileposList = [...new Set(fileposInNCX
|
||||
.concat(Array.from(str.matchAll(fileposRegex), m => m[1]))
|
||||
.concat(Array.from(str.matchAll(fileposRegex), m => m[1])))]
|
||||
.map(filepos => ({ filepos, number: Number(filepos) }))
|
||||
.sort((a, b) => a.number - b.number))]
|
||||
.sort((a, b) => a.number - b.number)
|
||||
|
||||
this.metadata = this.mobi.getMetadata()
|
||||
this.getCover = this.mobi.getCover.bind(this.mobi)
|
||||
|
||||
Reference in new issue
Block a user