better null check for stack (closes #354)
This commit is contained in:
parent
3bae233289
commit
0926be9781
@ -718,7 +718,7 @@ var Reveal = (function(){
|
|||||||
*/
|
*/
|
||||||
function setPreviousVerticalIndex( stack, v ) {
|
function setPreviousVerticalIndex( stack, v ) {
|
||||||
|
|
||||||
if( stack ) {
|
if( typeof stack === 'object' && typeof stack.setAttribute === 'function' ) {
|
||||||
stack.setAttribute( 'data-previous-indexv', v || 0 );
|
stack.setAttribute( 'data-previous-indexv', v || 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -733,7 +733,7 @@ var Reveal = (function(){
|
|||||||
*/
|
*/
|
||||||
function getPreviousVerticalIndex( stack ) {
|
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 );
|
return parseInt( stack.getAttribute( 'data-previous-indexv' ) || 0, 10 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
4
js/reveal.min.js
vendored
4
js/reveal.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user