From a282c22fc7bfc41d58466891b7e5a4e4a4ad977c Mon Sep 17 00:00:00 2001 From: dercodercom Date: Sat, 20 Jan 2018 17:58:25 +0100 Subject: [PATCH] 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. --- js/src/tab.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)