prevent repeated initialization #1616
This commit is contained in:
parent
d78a8046dc
commit
6bfa48a667
@ -165,6 +165,9 @@
|
|||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// Flags if Reveal.initialize() has been called
|
||||||
|
initialized = false,
|
||||||
|
|
||||||
// Flags if reveal.js is loaded (has dispatched the 'ready' event)
|
// Flags if reveal.js is loaded (has dispatched the 'ready' event)
|
||||||
loaded = false,
|
loaded = false,
|
||||||
|
|
||||||
@ -257,6 +260,11 @@
|
|||||||
*/
|
*/
|
||||||
function initialize( options ) {
|
function initialize( options ) {
|
||||||
|
|
||||||
|
// Make sure we only initialize once
|
||||||
|
if( initialized === true ) return;
|
||||||
|
|
||||||
|
initialized = true;
|
||||||
|
|
||||||
checkCapabilities();
|
checkCapabilities();
|
||||||
|
|
||||||
if( !features.transforms2d && !features.transforms3d ) {
|
if( !features.transforms2d && !features.transforms3d ) {
|
||||||
|
Loading…
Reference in New Issue
Block a user