From: GeoSot Date: Wed, 2 Mar 2022 00:16:51 +0000 (+0200) Subject: Carousel: small refactoring, remove unnecessary checks X-Git-Tag: v5.2.0-beta1~163 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d4e87d28cdc1b5d053b4c08da737321ab4de2ff7;p=thirdparty%2Fbootstrap.git Carousel: small refactoring, remove unnecessary checks --- diff --git a/js/src/carousel.js b/js/src/carousel.js index 0860622514..f37ded7c24 100644 --- a/js/src/carousel.js +++ b/js/src/carousel.js @@ -301,8 +301,7 @@ class Carousel extends BaseComponent { const isNext = order === ORDER_NEXT const nextElement = element || getNextActiveElement(this._getItems(), activeElement, isNext, this._config.wrap) - if (nextElement && nextElement.classList.contains(CLASS_NAME_ACTIVE)) { - this._isSliding = false + if (nextElement === activeElement) { return }