mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-09 15:16:51 +02: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:
@@ -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)
|
||||
|
Reference in New Issue
Block a user