diff --git a/js/mediaSlider.js b/js/mediaSlider.js index 50e30af..453e0bc 100644 --- a/js/mediaSlider.js +++ b/js/mediaSlider.js @@ -105,6 +105,9 @@ class MediaSlider { } createMediaElement(url) { + if (!url) { + return ``; + } const mediaType = this.detectMediaType(url); switch(mediaType) { case 'image': @@ -124,7 +127,7 @@ class MediaSlider { createSlider() { if (this.mediaUrls.length === 0) { - document.getElementById(this.containerId).innerHTML = '