Skip to content

Commit a377bfa

Browse files
committed
Commit compiled code
1 parent 431c51c commit a377bfa

File tree

8 files changed

+26
-4
lines changed

8 files changed

+26
-4
lines changed

dist/js/joomla-tab-es5.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -363,6 +363,7 @@ function _getPrototypeOf(o) {
363363
} // Convert tabs to accordian
364364

365365

366+
self.checkView(self);
366367
window.addEventListener('resize', function () {
367368
self.checkView(self);
368369
});
@@ -602,6 +603,11 @@ function _getPrototypeOf(o) {
602603
var element = el;
603604

604605
while (element.nodeName.toLowerCase() !== tagName) {
606+
// Ensure we haven't reached the top of the dom tree
607+
if (element.parentElement === null) {
608+
return;
609+
}
610+
605611
element = element.parentElement;
606612
}
607613

dist/js/joomla-tab-es5.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/js/joomla-tab.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,7 @@
167167
}
168168

169169
// Convert tabs to accordian
170+
self.checkView(self);
170171
window.addEventListener('resize', () => {
171172
self.checkView(self);
172173
});
@@ -385,6 +386,10 @@
385386
findAncestor(el, tagName) {
386387
let element = el;
387388
while (element.nodeName.toLowerCase() !== tagName) {
389+
// Ensure we haven't reached the top of the dom tree
390+
if (element.parentElement === null) {
391+
return;
392+
}
388393
element = element.parentElement;
389394
}
390395
return element;

dist/js/joomla-tab.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/_media/js/joomla-tab-es5.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -363,6 +363,7 @@ function _getPrototypeOf(o) {
363363
} // Convert tabs to accordian
364364

365365

366+
self.checkView(self);
366367
window.addEventListener('resize', function () {
367368
self.checkView(self);
368369
});
@@ -602,6 +603,11 @@ function _getPrototypeOf(o) {
602603
var element = el;
603604

604605
while (element.nodeName.toLowerCase() !== tagName) {
606+
// Ensure we haven't reached the top of the dom tree
607+
if (element.parentElement === null) {
608+
return;
609+
}
610+
605611
element = element.parentElement;
606612
}
607613

0 commit comments

Comments
 (0)