1
0
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:
Pierre Vanduynslager
2017-03-28 17:43:16 -04:00
committed by Johann-S
parent ce0e2f8e76
commit 48c5efa4c3
16 changed files with 101 additions and 155 deletions

View File

@@ -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) {