Skip to content

Commit

Permalink
only use nodeType 1 and 3 (only relevant types)
Browse files Browse the repository at this point in the history
  • Loading branch information
Maarten Schroeven authored and hakimel committed Oct 5, 2016
1 parent ab33b31 commit 7e99626
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion js/reveal.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 7e99626

Please sign in to comment.