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>2017-04-02 05:18:29 +0300
committerMark Otto <markdotto@gmail.com>2017-04-02 05:18:29 +0300
commit49b6cf845d3d3bf49197a529548489f9a1a76709 (patch)
tree725316258a4fbd311fc53ece9218e0d35e7ae827 /js/dist/carousel.js
parent5142de7e592abc0a791ea3465616795c91219bcc (diff)
grunt
Diffstat (limited to 'js/dist/carousel.js')
-rw-r--r--js/dist/carousel.js10
1 files changed, 4 insertions, 6 deletions
diff --git a/js/dist/carousel.js b/js/dist/carousel.js
index f7af6550e9..77d6e80d90 100644
--- a/js/dist/carousel.js
+++ b/js/dist/carousel.js
@@ -112,10 +112,9 @@ var Carousel = function ($) {
// public
Carousel.prototype.next = function next() {
- if (this._isSliding) {
- throw new Error('Carousel is sliding');
+ if (!this._isSliding) {
+ this._slide(Direction.NEXT);
}
- this._slide(Direction.NEXT);
};
Carousel.prototype.nextWhenVisible = function nextWhenVisible() {
@@ -126,10 +125,9 @@ var Carousel = function ($) {
};
Carousel.prototype.prev = function prev() {
- if (this._isSliding) {
- throw new Error('Carousel is sliding');
+ if (!this._isSliding) {
+ this._slide(Direction.PREV);
}
- this._slide(Direction.PREV);
};
Carousel.prototype.pause = function pause(event) {