Skip to content

Commit

Permalink
use 'isDisabled' helper
Browse files Browse the repository at this point in the history
  • Loading branch information
GeoSot committed Mar 17, 2021
1 parent 12bad0f commit 5cf54be
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions js/src/tab.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {
emulateTransitionEnd,
getElementFromSelector,
getTransitionDurationFromElement,
isDisabled,
reflow
} from './util/index'
import Data from './dom/data'
Expand All @@ -36,7 +37,6 @@ const EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`

const CLASS_NAME_DROPDOWN_MENU = 'dropdown-menu'
const CLASS_NAME_ACTIVE = 'active'
const CLASS_NAME_DISABLED = 'disabled'
const CLASS_NAME_FADE = 'fade'
const CLASS_NAME_SHOW = 'show'

Expand Down Expand Up @@ -67,8 +67,7 @@ class Tab extends BaseComponent {
if ((this._element.parentNode &&
this._element.parentNode.nodeType === Node.ELEMENT_NODE &&
this._element.classList.contains(CLASS_NAME_ACTIVE)) ||
this._element.classList.contains(CLASS_NAME_DISABLED) ||
this._element.hasAttribute('disabled')) {
isDisabled(this._element)) {
return
}

Expand Down

0 comments on commit 5cf54be

Please sign in to comment.