diff options
Diffstat (limited to 'js/src/tab.js')
| -rw-r--r-- | js/src/tab.js | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/js/src/tab.js b/js/src/tab.js index 0e9755ea0..c8aac3be7 100644 --- a/js/src/tab.js +++ b/js/src/tab.js @@ -95,15 +95,11 @@ class Tab extends BaseComponent { relatedTarget: previous }) - if (showEvent.defaultPrevented || - (hideEvent !== null && hideEvent.defaultPrevented)) { + if (showEvent.defaultPrevented || (hideEvent !== null && hideEvent.defaultPrevented)) { return } - this._activate( - this._element, - listElement - ) + this._activate(this._element, listElement) const complete = () => { EventHandler.trigger(previous, EVENT_HIDDEN, { @@ -129,14 +125,9 @@ class Tab extends BaseComponent { SelectorEngine.children(container, SELECTOR_ACTIVE) const active = activeElements[0] - const isTransitioning = callback && - (active && active.classList.contains(CLASS_NAME_FADE)) - - const complete = () => this._transitionComplete( - element, - active, - callback - ) + const isTransitioning = callback && (active && active.classList.contains(CLASS_NAME_FADE)) + + const complete = () => this._transitionComplete(element, active, callback) if (active && isTransitioning) { const transitionDuration = getTransitionDurationFromElement(active) |
