diff options
Diffstat (limited to 'js/src/collapse.js')
| -rw-r--r-- | js/src/collapse.js | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/js/src/collapse.js b/js/src/collapse.js index 6f09fcadd..dc2e2a67d 100644 --- a/js/src/collapse.js +++ b/js/src/collapse.js @@ -120,11 +120,8 @@ const Collapse = (($) => { } show() { - if (this._isTransitioning) { - throw new Error('Collapse is transitioning') - } - - if ($(this._element).hasClass(ClassName.SHOW)) { + if (this._isTransitioning || + $(this._element).hasClass(ClassName.SHOW)) { return } @@ -204,11 +201,8 @@ const Collapse = (($) => { } hide() { - if (this._isTransitioning) { - throw new Error('Collapse is transitioning') - } - - if (!$(this._element).hasClass(ClassName.SHOW)) { + if (this._isTransitioning || + !$(this._element).hasClass(ClassName.SHOW)) { return } |
