better error message when '.reveal' root node is missing #2217
parent
b18f12d964
commit
e237fea99a
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -44,6 +44,11 @@ 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
|
||||
|
|
Loading…
Reference in New Issue