better error message when '.reveal' root node is missing #2217
This commit is contained in:
parent
b18f12d964
commit
e237fea99a
4
dist/reveal.esm.js
vendored
4
dist/reveal.esm.js
vendored
File diff suppressed because one or more lines are too long
4
dist/reveal.js
vendored
4
dist/reveal.js
vendored
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
Block a user