From 3e5eaecf140585bf6dc3ba5225882838747d6564 Mon Sep 17 00:00:00 2001 From: Lu Wang Date: Wed, 6 Nov 2013 16:38:11 +0800 Subject: [PATCH] fix typos --- share/pdf2htmlEX.js.in | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/share/pdf2htmlEX.js.in b/share/pdf2htmlEX.js.in index f0085c1..6ebd433 100644 --- a/share/pdf2htmlEX.js.in +++ b/share/pdf2htmlEX.js.in @@ -309,7 +309,8 @@ var nodes = div.childNodes; for(var i = 0, l = nodes.length; i < l; ++i) { var cur_node = nodes[i]; - if(cur_node.classList.contains(CSS_CLASS_NAMES.page_frame)) { + if((cur_node.nodeType == Node.ELEMENT_NODE) + && cur_node.classList.contains(CSS_CLASS_NAMES.page_frame)) { new_page = cur_node; break; } @@ -591,7 +592,7 @@ cur_pos = transform(cur_page.ictm, [cur_pos[0], cur_page.height()-cur_pos[1]]); } - var detail_str = /** @type{string} */ (e.target.getAttribute('data-dest-detail')); + var detail_str = /** @type{string} */ (target.getAttribute('data-dest-detail')); if(detail_str === undefined) return; var ok = false;