From: dercodercom Date: Sat, 20 Jan 2018 16:58:25 +0000 (+0100) Subject: Update tab.js X-Git-Tag: v4.2.0~185 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a282c22fc7bfc41d58466891b7e5a4e4a4ad977c;p=thirdparty%2Fbootstrap.git 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. --- diff --git a/js/src/tab.js b/js/src/tab.js index af296f74fe..7333f22a1f 100644 --- a/js/src/tab.js +++ b/js/src/tab.js @@ -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)