Browse Source

check for slides container too #2217

master
Hakim El Hattab 5 months ago
parent
commit
01d8d669bc
  1. 2
      dist/reveal.esm.js
  2. 2
      dist/reveal.js
  3. 9
      js/reveal.js

2
dist/reveal.esm.js

File diff suppressed because one or more lines are too long

2
dist/reveal.js

File diff suppressed because one or more lines are too long

9
js/reveal.js

@ -44,11 +44,6 @@ export default function( revealElement, options ) {
revealElement = document.querySelector( '.reveal' );
}
// reveal.js can not be initialized without a root element
if( !revealElement ) {
throw 'Invalid or missing <div class="reveal"> element';
}
const Reveal = {};
// Configuration defaults, can be overridden at initialization time
@ -126,10 +121,14 @@ export default function( revealElement, options ) {
*/
function initialize( initOptions ) {
if( !revealElement ) throw 'Unable to find presentation root (<div class="reveal">).';
// Cache references to key DOM elements
dom.wrapper = revealElement;
dom.slides = revealElement.querySelector( '.slides' );
if( !dom.slides ) throw 'Unable to find slides container (<div class="slides">).';
// Compose our config object in order of increasing precedence:
// 1. Default reveal.js options
// 2. Options provided via Reveal.configure() prior to

Loading…
Cancel
Save