better error message when '.reveal' root node is missing #2217
This commit is contained in:
1 parent
b18f12d964
commit
e237fea99a
3 files changed
+9
-4
No files matched your search
@@ -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
|
||||
|
||||
Reference in new issue
Block a user