aboutsummaryrefslogtreecommitdiff
path: root/js/src/tab.js
diff options
context:
space:
mode:
authordercodercom <[email protected]>2018-01-20 17:58:25 +0100
committerJohann-S <[email protected]>2018-10-29 14:01:03 +0100
commita282c22fc7bfc41d58466891b7e5a4e4a4ad977c (patch)
tree5483e7be09697bb2c2eeae0791b15e98b7a39506 /js/src/tab.js
parentfff9e17d7e5307a695c4459402342774e7d70e36 (diff)
downloadbootstrap-a282c22fc7bfc41d58466891b7e5a4e4a4ad977c.tar.xz
bootstrap-a282c22fc7bfc41d58466891b7e5a4e4a4ad977c.zip
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.
Diffstat (limited to 'js/src/tab.js')
-rw-r--r--js/src/tab.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/js/src/tab.js b/js/src/tab.js
index af296f74f..7333f22a1 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)