Fix TypeError: (((branch[i].navLabel && branch[i].navLabel.text) || branch[i].navLabel) || "").trim is not a function
This commit is contained in:
parent
ad81ba6241
commit
c62df483f4
3
epub.js
3
epub.js
@ -522,7 +522,8 @@ EPub.prototype.walkNavMap = function (branch, path, id_list, level) {
|
||||
|
||||
var title = '';
|
||||
if (branch[i].navLabel && typeof branch[i].navLabel.text == 'string') {
|
||||
title = branch[i].navLabel.text.trim();
|
||||
title = branch[i].navLabel && branch[i].navLabel.text || branch[i].navLabel===branch[i].navLabel ?
|
||||
'' : (branch[i].navLabel && branch[i].navLabel.text || branch[i].navLabel || "").trim();
|
||||
}
|
||||
var order = Number(branch[i]["@"] && branch[i]["@"].playOrder || 0);
|
||||
if (isNaN(order)) {
|
||||
|
Reference in New Issue
Block a user