diff options
| author | GeoSot <[email protected]> | 2022-03-02 02:18:55 +0200 |
|---|---|---|
| committer | XhmikosR <[email protected]> | 2022-03-09 17:25:47 +0200 |
| commit | 7e5a8016ba557641ee93b38aed4482a1360b64af (patch) | |
| tree | b44da950762dcfb2a58348e216ea5eaee41e7f75 /js/src/carousel.js | |
| parent | d4e87d28cdc1b5d053b4c08da737321ab4de2ff7 (diff) | |
| download | bootstrap-7e5a8016ba557641ee93b38aed4482a1360b64af.tar.xz bootstrap-7e5a8016ba557641ee93b38aed4482a1360b64af.zip | |
Carousel: return early in `_slide` method
Diffstat (limited to 'js/src/carousel.js')
| -rw-r--r-- | js/src/carousel.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/js/src/carousel.js b/js/src/carousel.js index f37ded7c2..f5917eb7f 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 => { |
