null check background

master
Hakim El Hattab 2014-04-28 12:31:34 +02:00
parent 1391253cb8
commit fbf999ec81
1 changed files with 23 additions and 19 deletions

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';
}
}