mirror of
https://github.com/john-okeefe/foliate-js.git
synced 2026-09-09 11:29:14 -04:00
MOBI: fix duplicated anchors
This commit is contained in:
@@ -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