Browse Source

better null check for stack (closes #354)

embed
Hakim El Hattab 12 years ago
parent
commit
0926be9781
  1. 4
      js/reveal.js
  2. 4
      js/reveal.min.js

4
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 );
}

4
js/reveal.min.js

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save