mirror of
https://github.com/twbs/bootstrap.git
synced 2025-03-15 15:29:22 +01:00
Carousel: return early in _slide
method
This commit is contained in:
parent
d4e87d28cd
commit
7e5a8016ba
@ -297,6 +297,10 @@ class Carousel extends BaseComponent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
_slide(order, element = null) {
|
_slide(order, element = null) {
|
||||||
|
if (this._isSliding) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
const activeElement = this._getActive()
|
const activeElement = this._getActive()
|
||||||
const isNext = order === ORDER_NEXT
|
const isNext = order === ORDER_NEXT
|
||||||
const nextElement = element || getNextActiveElement(this._getItems(), activeElement, isNext, this._config.wrap)
|
const nextElement = element || getNextActiveElement(this._getItems(), activeElement, isNext, this._config.wrap)
|
||||||
@ -305,10 +309,6 @@ class Carousel extends BaseComponent {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this._isSliding) {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
const nextElementIndex = this._getItemIndex(nextElement)
|
const nextElementIndex = this._getItemIndex(nextElement)
|
||||||
|
|
||||||
const triggerEvent = eventName => {
|
const triggerEvent = eventName => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user