From 0b6585bd44fe86344408d9d3ab8d3c17e254738a Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Wed, 5 Oct 2016 11:23:41 +0200 Subject: [PATCH] prevent exception when initializing with no slides #1678 #1679 --- js/reveal.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/js/reveal.js b/js/reveal.js index 09cc5b6..675f5ad 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -2137,6 +2137,9 @@ // Query all horizontal slides in the deck 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 // stack, resume at its previous vertical index if( v === undefined && !isOverview() ) {