From 559da3eef8b5a81a634871e91cde108e13a726ce Mon Sep 17 00:00:00 2001 From: David Canuel-Gagnon Date: Fri, 19 May 2017 11:39:05 -0400 Subject: [PATCH] checking if the element has any properties first --- lib/epub-parser.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/epub-parser.js b/lib/epub-parser.js index 6b26dea..013833c 100644 --- a/lib/epub-parser.js +++ b/lib/epub-parser.js @@ -384,7 +384,7 @@ EpubParser = (function() { } if(prop.match(/identifier$/i)) { - if(typeof metas[prop][0].$.id) { + if(metas[prop][0].$) { if(metas[prop][0].$.id==uniqueIdentifier) { if(typeof content == 'object') { console.log('warning - content not fully parsed');