1
0
mirror of https://github.com/webslides/WebSlides.git synced 2025-08-26 06:24:28 +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} * @type {Element}
*/ */
this.el = document.getElementById('webslides'); this.el = document.getElementById('webslides');
if (!this.el) {
throw new Error('Couldn\'t find the webslides container!');
}
/** /**
* Moving flag. * Moving flag.
* @type {boolean} * @type {boolean}
@@ -108,10 +113,6 @@ export default class WebSlides {
*/ */
this.initialised = false; this.initialised = false;
if (!this.el) {
throw new Error('Couldn\'t find the webslides container!');
}
// Bootstrapping // Bootstrapping
this.removeChildren_(); this.removeChildren_();
this.grabSlides_(); this.grabSlides_();