From 3ec37d4a4d043ded903c807818e7894de084409f Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Fri, 2 Dec 2016 10:13:36 -0800 Subject: grunt --- js/dist/collapse.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'js/dist/collapse.js') 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; } -- cgit v1.2.3