From 7e99626b142b334d2563660d260ffa96ccf34fcf Mon Sep 17 00:00:00 2001 From: Maarten Schroeven Date: Thu, 18 Aug 2016 10:56:59 +0200 Subject: [PATCH] only use nodeType 1 and 3 (only relevant types) --- js/reveal.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/reveal.js b/js/reveal.js index b0bc9359..e78cb8f4 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -558,7 +558,7 @@ var text = ""; if(node.nodeType === 3) { //text node text += node.textContent; - }else { + }else if (node.nodeType === 1) { //element node var isAriaHidden = node.getAttribute('aria-hidden'); var isDisplayHidden = window.getComputedStyle(node)['display'] === 'none'; if (isAriaHidden !== 'true' && !isDisplayHidden) {