From: GeoSot Date: Wed, 2 Mar 2022 00:18:55 +0000 (+0200) Subject: Carousel: return early in `_slide` method X-Git-Tag: v5.2.0-beta1~162 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7e5a8016ba557641ee93b38aed4482a1360b64af;p=thirdparty%2Fbootstrap.git Carousel: return early in `_slide` method --- diff --git a/js/src/carousel.js b/js/src/carousel.js index f37ded7c24..f5917eb7f4 100644 --- a/js/src/carousel.js +++ b/js/src/carousel.js @@ -297,6 +297,10 @@ class Carousel extends BaseComponent { } _slide(order, element = null) { + if (this._isSliding) { + return + } + const activeElement = this._getActive() const isNext = order === ORDER_NEXT const nextElement = element || getNextActiveElement(this._getItems(), activeElement, isNext, this._config.wrap) @@ -305,10 +309,6 @@ class Carousel extends BaseComponent { return } - if (this._isSliding) { - return - } - const nextElementIndex = this._getItemIndex(nextElement) const triggerEvent = eventName => {