mirror of
https://github.com/twbs/bootstrap.git
synced 2024-12-01 13:24:25 +01:00
Update tab.js
I'm using Tab.js with remove function and get an error "TypeError: container is undefined [more info]", with this check the error is fixed.
This commit is contained in:
parent
fff9e17d7e
commit
a282c22fc7
@ -142,7 +142,7 @@ class Tab {
|
||||
|
||||
_activate(element, container, callback) {
|
||||
let activeElements
|
||||
if (container.nodeName === 'UL') {
|
||||
if (container && container.nodeName === 'UL') {
|
||||
activeElements = $(container).find(Selector.ACTIVE_UL)
|
||||
} else {
|
||||
activeElements = $(container).children(Selector.ACTIVE)
|
||||
|
Loading…
Reference in New Issue
Block a user