From 7c89d9723cc1ce9743ee06eb8698e268c8e42f1f Mon Sep 17 00:00:00 2001 From: bwbohl Date: Wed, 7 Dec 2022 00:49:54 +0100 Subject: [PATCH] Update carousel.js animateCarousel function: return if carousel is null --- js/carousel.js | 1 + 1 file changed, 1 insertion(+) 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;