mirror of
https://github.com/hakimel/reveal.js.git
synced 2025-07-31 03:40:28 +02:00
null check background
This commit is contained in:
@@ -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';
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user