mirror of
https://github.com/john-okeefe/foliate-js.git
synced 2026-09-09 11:29:14 -04:00
MOBI6: empty string instead of undefined in TOC
Should fix https://github.com/johnfactotum/foliate/issues/1347
This commit is contained in:
@@ -720,7 +720,7 @@ class MOBI6 {
|
|||||||
.reduce((arr, a) => {
|
.reduce((arr, a) => {
|
||||||
const indent = getIndent(a)
|
const indent = getIndent(a)
|
||||||
const item = {
|
const item = {
|
||||||
label: a.innerText?.trim(),
|
label: a.innerText?.trim() ?? '',
|
||||||
href: `filepos:${a.getAttribute('filepos')}`,
|
href: `filepos:${a.getAttribute('filepos')}`,
|
||||||
}
|
}
|
||||||
const level = indent > lastIndent ? lastLevel + 1
|
const level = indent > lastIndent ? lastLevel + 1
|
||||||
|
|||||||
Reference in New Issue
Block a user