aboutsummaryrefslogtreecommitdiff
path: root/js/reveal.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/reveal.js')
-rw-r--r--js/reveal.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/js/reveal.js b/js/reveal.js
index 65ba58d..664fc90 100644
--- a/js/reveal.js
+++ b/js/reveal.js
@@ -718,7 +718,7 @@ var Reveal = (function(){
*/
function setPreviousVerticalIndex( stack, v ) {
- if( stack ) {
+ if( typeof stack === 'object' && typeof stack.setAttribute === 'function' ) {
stack.setAttribute( 'data-previous-indexv', v || 0 );
}
@@ -733,7 +733,7 @@ var Reveal = (function(){
*/
function getPreviousVerticalIndex( stack ) {
- if( stack && stack.classList.contains( 'stack' ) ) {
+ if( typeof stack === 'object' && typeof stack.setAttribute === 'function' && stack.classList.contains( 'stack' ) ) {
return parseInt( stack.getAttribute( 'data-previous-indexv' ) || 0, 10 );
}