1
0
mirror of https://github.com/webslides/WebSlides.git synced 2025-08-25 14:10:42 +02:00

Moving error to be more meaningful

This commit is contained in:
Antonio Laguna
2017-03-13 16:26:34 +01:00
parent 13bccdfa88
commit b904c4da0f

View File

@@ -52,6 +52,11 @@ export default class WebSlides {
* @type {Element}
*/
this.el = document.getElementById('webslides');
if (!this.el) {
throw new Error('Couldn\'t find the webslides container!');
}
/**
* Moving flag.
* @type {boolean}
@@ -108,10 +113,6 @@ export default class WebSlides {
*/
this.initialised = false;
if (!this.el) {
throw new Error('Couldn\'t find the webslides container!');
}
// Bootstrapping
this.removeChildren_();
this.grabSlides_();