2
0
mirror of https://github.com/tenrok/bootstrap.git synced 2026-06-05 16:42:29 +03:00

Fix JS components console error "Error: <Component> is transitioning"

This commit is contained in:
Pierre Vanduynslager
2017-03-28 17:43:16 -04:00
committed by Johann-S
parent ce0e2f8e76
commit 48c5efa4c3
16 changed files with 101 additions and 155 deletions
+4 -10
View File
@@ -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
}