Remove redundant sanity checks
unnecessary, as these checks should never fail (since the handler would not be called if there weren't any tabs, and the `index > 0` clause in the preceding `if` ensures that `index` will never be negative
This commit is contained in:
parent
1687b77a48
commit
fabe1f0e24
1 changed files with 0 additions and 8 deletions
|
|
@ -245,10 +245,6 @@ class Tab {
|
|||
|
||||
const tabs = makeArray(SelectorEngine.find(Selector.DATA_TOGGLE, tablist))
|
||||
|
||||
if (!tabs.length) {
|
||||
return
|
||||
}
|
||||
|
||||
let index = tabs.indexOf(event.target)
|
||||
const tabInstance = Data.getData(tabs[index], DATA_KEY) || new Tab(tabs[index])
|
||||
|
||||
|
|
@ -266,10 +262,6 @@ class Tab {
|
|||
index++
|
||||
}
|
||||
|
||||
if (index < 0) {
|
||||
index = 0
|
||||
}
|
||||
|
||||
tabs[index].focus()
|
||||
tabs[index].click()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue