mirror of
https://github.com/twbs/bootstrap.git
synced 2025-09-26 21:39:08 +02:00
Fix JS components console error "Error: <Component> is transitioning"
This commit is contained in:
committed by
Johann-S
parent
ce0e2f8e76
commit
48c5efa4c3
@@ -120,10 +120,9 @@ const Carousel = (($) => {
|
||||
// public
|
||||
|
||||
next() {
|
||||
if (this._isSliding) {
|
||||
throw new Error('Carousel is sliding')
|
||||
if (!this._isSliding) {
|
||||
this._slide(Direction.NEXT)
|
||||
}
|
||||
this._slide(Direction.NEXT)
|
||||
}
|
||||
|
||||
nextWhenVisible() {
|
||||
@@ -134,10 +133,9 @@ const Carousel = (($) => {
|
||||
}
|
||||
|
||||
prev() {
|
||||
if (this._isSliding) {
|
||||
throw new Error('Carousel is sliding')
|
||||
if (!this._isSliding) {
|
||||
this._slide(Direction.PREV)
|
||||
}
|
||||
this._slide(Direction.PREV)
|
||||
}
|
||||
|
||||
pause(event) {
|
||||
|
Reference in New Issue
Block a user