aboutsummaryrefslogtreecommitdiff
path: root/js/dist/collapse.js
diff options
context:
space:
mode:
authorMark Otto <[email protected]>2016-12-02 10:13:36 -0800
committerMark Otto <[email protected]>2016-12-02 10:13:36 -0800
commit3ec37d4a4d043ded903c807818e7894de084409f (patch)
treeaaf483f062a7f721093632df5d0d198e9830dacc /js/dist/collapse.js
parente3a569f4f6ab326d78300c6a8ab3e3766075cfd0 (diff)
downloadbootstrap-3ec37d4a4d043ded903c807818e7894de084409f.tar.xz
bootstrap-3ec37d4a4d043ded903c807818e7894de084409f.zip
grunt
Diffstat (limited to 'js/dist/collapse.js')
-rw-r--r--js/dist/collapse.js12
1 files changed, 10 insertions, 2 deletions
diff --git a/js/dist/collapse.js b/js/dist/collapse.js
index f4a25a11c..41c5533b5 100644
--- a/js/dist/collapse.js
+++ b/js/dist/collapse.js
@@ -103,7 +103,11 @@ var Collapse = function ($) {
Collapse.prototype.show = function show() {
var _this = this;
- if (this._isTransitioning || $(this._element).hasClass(ClassName.ACTIVE)) {
+ if (this._isTransitioning) {
+ throw new Error('Collapse is transitioning');
+ }
+
+ if ($(this._element).hasClass(ClassName.ACTIVE)) {
return;
}
@@ -176,7 +180,11 @@ var Collapse = function ($) {
Collapse.prototype.hide = function hide() {
var _this2 = this;
- if (this._isTransitioning || !$(this._element).hasClass(ClassName.ACTIVE)) {
+ if (this._isTransitioning) {
+ throw new Error('Collapse is transitioning');
+ }
+
+ if (!$(this._element).hasClass(ClassName.ACTIVE)) {
return;
}