From 9873839a50bffa9ef57050cf583588db2f66fde6 Mon Sep 17 00:00:00 2001
From: Hakim El Hattab <hakim.elhattab@gmail.com>
Date: Mon, 28 Apr 2014 11:51:21 +0200
Subject: [PATCH] fix issue with background images on first vertical sldie

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

diff --git a/js/reveal.js b/js/reveal.js
index 8c8b619..df1b1f5 100644
--- a/js/reveal.js
+++ b/js/reveal.js
@@ -2332,8 +2332,8 @@
 		if( background.hasAttribute( 'data-loaded' ) === false ) {
 			background.setAttribute( 'data-loaded', 'true' );
 
-			var backgroundImage = slide.getAttribute( 'data-background-image' );
-			var backgroundVideo = slide.getAttribute( 'data-background-video' );
+			var backgroundImage = slide.getAttribute( 'data-background-image' ),
+				backgroundVideo = slide.getAttribute( 'data-background-video' );
 
 			// Images
 			if( backgroundImage ) {
@@ -2673,7 +2673,7 @@
 			h = Math.max( horizontalSlides.indexOf( slideh ), 0 );
 
 			// Assume we're not vertical
-			v = 0;
+			v = undefined;
 
 			// If this is a vertical slide, grab the vertical index
 			if( isVertical ) {
-- 
GitLab