Skip to content
Snippets Groups Projects
Commit 0fe62719 authored by Eric Bremner's avatar Eric Bremner
Browse files

Fixing js error when no tabs exists

parent 980fbdb3
No related branches found
No related tags found
No related merge requests found
......@@ -6,6 +6,10 @@
const tabs = document.querySelectorAll('[role="tab"]');
const tabList = document.querySelector('[role="tablist"]');
if (tabs.length == 0) {
return;
}
// Add a click event handler to each tab
tabs.forEach(tab => {
tab.addEventListener("click", changeTabs);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment