]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
Carousel: small refactoring, remove unnecessary checks
authorGeoSot <geo.sotis@gmail.com>
Wed, 2 Mar 2022 00:16:51 +0000 (02:16 +0200)
committerXhmikosR <xhmikosr@gmail.com>
Wed, 9 Mar 2022 15:25:47 +0000 (17:25 +0200)
js/src/carousel.js

index 0860622514b28fe67c092b6311eed3a520564cd8..f37ded7c24af2116219732a4eb91ce63f5b6e403 100644 (file)
@@ -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
     }