check for slides container too #2217
This commit is contained in:
parent
e237fea99a
commit
01d8d669bc
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -44,11 +44,6 @@ export default function( revealElement, options ) {
|
||||||
revealElement = document.querySelector( '.reveal' );
|
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 = {};
|
const Reveal = {};
|
||||||
|
|
||||||
// Configuration defaults, can be overridden at initialization time
|
// Configuration defaults, can be overridden at initialization time
|
||||||
|
@ -126,10 +121,14 @@ export default function( revealElement, options ) {
|
||||||
*/
|
*/
|
||||||
function initialize( initOptions ) {
|
function initialize( initOptions ) {
|
||||||
|
|
||||||
|
if( !revealElement ) throw 'Unable to find presentation root (<div class="reveal">).';
|
||||||
|
|
||||||
// Cache references to key DOM elements
|
// Cache references to key DOM elements
|
||||||
dom.wrapper = revealElement;
|
dom.wrapper = revealElement;
|
||||||
dom.slides = revealElement.querySelector( '.slides' );
|
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:
|
// Compose our config object in order of increasing precedence:
|
||||||
// 1. Default reveal.js options
|
// 1. Default reveal.js options
|
||||||
// 2. Options provided via Reveal.configure() prior to
|
// 2. Options provided via Reveal.configure() prior to
|
||||||
|
|
Loading…
Reference in New Issue