prevent exception when initializing with no slides #1678 #1679

edit
Hakim El Hattab 2016-10-05 11:23:41 +02:00
parent ea8964ddbf
commit 0b6585bd44
1 changed files with 3 additions and 0 deletions

View File

@ -2137,6 +2137,9 @@
// Query all horizontal slides in the deck // Query all horizontal slides in the deck
var horizontalSlides = dom.wrapper.querySelectorAll( HORIZONTAL_SLIDES_SELECTOR ); var horizontalSlides = dom.wrapper.querySelectorAll( HORIZONTAL_SLIDES_SELECTOR );
// Abort if there are no slides
if( horizontalSlides.length === 0 ) return;
// If no vertical index is specified and the upcoming slide is a // If no vertical index is specified and the upcoming slide is a
// stack, resume at its previous vertical index // stack, resume at its previous vertical index
if( v === undefined && !isOverview() ) { if( v === undefined && !isOverview() ) {