Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/carousel.js')
-rw-r--r--js/src/carousel.js10
1 files changed, 4 insertions, 6 deletions
diff --git a/js/src/carousel.js b/js/src/carousel.js
index 1aca817f12..7c2da45ad7 100644
--- a/js/src/carousel.js
+++ b/js/src/carousel.js
@@ -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) {