diff --git a/src/js/modules/webslides.js b/src/js/modules/webslides.js index 2e4d473..dc1e9f3 100644 --- a/src/js/modules/webslides.js +++ b/src/js/modules/webslides.js @@ -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_();