aboutsummaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorHakim El Hattab <hakim.elhattab@gmail.com>2016-10-05 11:23:41 +0200
committerHakim El Hattab <hakim.elhattab@gmail.com>2016-10-05 11:23:41 +0200
commit0b6585bd44fe86344408d9d3ab8d3c17e254738a (patch)
treeeae0bf5ea815a613575d7aea08909fa8017fbcbc /js
parentea8964ddbf7a603197fee093b206bc879ebabd33 (diff)
downloadfreenode-live-2017-presentation-0b6585bd44fe86344408d9d3ab8d3c17e254738a.tar
freenode-live-2017-presentation-0b6585bd44fe86344408d9d3ab8d3c17e254738a.tar.gz
prevent exception when initializing with no slides #1678 #1679
Diffstat (limited to 'js')
-rw-r--r--js/reveal.js3
1 files changed, 3 insertions, 0 deletions
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() ) {