diff --git a/js/carousel.js b/js/carousel.js index 94fd44be..9c58acd7 100644 --- a/js/carousel.js +++ b/js/carousel.js @@ -22,6 +22,7 @@ let intervals = []; */ function animateCarousel(carousel, milliseconds) { "use strict"; + if (carousel === null) return; const slides = carousel.getElementsByClassName("carousel-locator"); const id = carousel.id; var slideIndex = 0;