diff options
Diffstat (limited to 'js/dist/collapse.js')
| -rw-r--r-- | js/dist/collapse.js | 12 |
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; } |
