0
0
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:
dercodercom 2018-01-20 17:58:25 +01:00 committed by Johann-S
parent fff9e17d7e
commit a282c22fc7

View File

@ -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)