Skip to content

Commit

Permalink
prevent double-initialization #3696
Browse files Browse the repository at this point in the history
  • Loading branch information
hakimel committed Oct 25, 2024
1 parent 96ca819 commit 16ac4b0
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion dist/reveal.esm.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/reveal.esm.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/reveal.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/reveal.js.map

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions js/reveal.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,8 @@ export default function( revealElement, options ) {

if( !revealElement ) throw 'Unable to find presentation root (<div class="reveal">).';

if( initialized ) throw 'Reveal.js has already been initialized.';

initialized = true;

// Cache references to key DOM elements
Expand Down

0 comments on commit 16ac4b0

Please sign in to comment.