From e704b3ffc8eb55913ed6c8f80db0615b9a692b91 Mon Sep 17 00:00:00 2001
From: Hakim El Hattab <hakim.elhattab@gmail.com>
Date: Thu, 25 Jan 2018 09:59:04 +0100
Subject: [PATCH] fix bug where left/right arrows appeared when there were no
 horizontal slides

---
 js/reveal.js | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/js/reveal.js b/js/reveal.js
index c9fa9f1f..df63b895 100644
--- a/js/reveal.js
+++ b/js/reveal.js
@@ -3364,9 +3364,11 @@
 		var horizontalSlides = dom.wrapper.querySelectorAll( HORIZONTAL_SLIDES_SELECTOR ),
 			verticalSlides = dom.wrapper.querySelectorAll( VERTICAL_SLIDES_SELECTOR );
 
+		var hasHorizontalSlides = horizontalSlides.length > 1;
+
 		var routes = {
-			left: indexh > 0 || config.loop,
-			right: indexh < horizontalSlides.length - 1 || config.loop,
+			left: indexh > 0 || ( config.loop && hasHorizontalSlides ),
+			right: indexh < horizontalSlides.length - 1 || ( config.loop && hasHorizontalSlides ),
 			up: indexv > 0,
 			down: indexv < verticalSlides.length - 1
 		};
-- 
GitLab