null check background

This commit is contained in:
Hakim El Hattab 2014-04-28 12:31:34 +02:00
parent 1391253cb8
commit fbf999ec81

View file

@ -2326,6 +2326,7 @@
// Show the corresponding background element
var indices = getIndices( slide );
var background = getSlideBackground( indices.h, indices.v );
if( background ) {
background.style.display = 'block';
// If the background contains media, load it
@ -2351,6 +2352,7 @@
background.appendChild( video );
}
}
}
}
@ -2366,7 +2368,9 @@
// Hide the corresponding background element
var indices = getIndices( slide );
var background = getSlideBackground( indices.h, indices.v );
if( background ) {
background.style.display = 'none';
}
}