Skip to content

Commit

Permalink
futurepress#967 Some books doesn't open in epubjs reader because of u…
Browse files Browse the repository at this point in the history
…nique identifier
tarungupta-in committed Aug 7, 2019
1 parent b957ccf commit f03b9f5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/packaging.js
Original file line number Diff line number Diff line change
@@ -198,7 +198,7 @@ class Packaging {
}

if (identifier.localName === "identifier" && identifier.namespaceURI === "http://purl.org/dc/elements/1.1/") {
return identifier.childNodes[0].nodeValue.trim();
return identifier.childNodes.length > 0 ? identifier.childNodes[0].nodeValue.trim() : "";
}

return "";

0 comments on commit f03b9f5

Please sign in to comment.