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:
authorMark Otto <markdotto@gmail.com>2016-12-02 21:13:36 +0300
committerMark Otto <markdotto@gmail.com>2016-12-02 21:13:36 +0300
commit3ec37d4a4d043ded903c807818e7894de084409f (patch)
treeaaf483f062a7f721093632df5d0d198e9830dacc /js/dist/carousel.js
parente3a569f4f6ab326d78300c6a8ab3e3766075cfd0 (diff)
grunt
Diffstat (limited to 'js/dist/carousel.js')
-rw-r--r--js/dist/carousel.js10
1 files changed, 6 insertions, 4 deletions
diff --git a/js/dist/carousel.js b/js/dist/carousel.js
index 8b6119a074..60803b9fc3 100644
--- a/js/dist/carousel.js
+++ b/js/dist/carousel.js
@@ -108,9 +108,10 @@ var Carousel = function ($) {
// public
Carousel.prototype.next = function next() {
- if (!this._isSliding) {
- this._slide(Direction.NEXT);
+ if (this._isSliding) {
+ throw new Error('Carousel is sliding');
}
+ this._slide(Direction.NEXT);
};
Carousel.prototype.nextWhenVisible = function nextWhenVisible() {
@@ -121,9 +122,10 @@ var Carousel = function ($) {
};
Carousel.prototype.prev = function prev() {
- if (!this._isSliding) {
- this._slide(Direction.PREVIOUS);
+ if (this._isSliding) {
+ throw new Error('Carousel is sliding');
}
+ this._slide(Direction.PREVIOUS);
};
Carousel.prototype.pause = function pause(event) {