null check background
This commit is contained in:
parent
1391253cb8
commit
fbf999ec81
1 changed files with 23 additions and 19 deletions
|
@ -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';
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue