Commit 0fe62719 authored by Eric Bremner's avatar Eric Bremner

Fixing js error when no tabs exists

parent 980fbdb3
......@@ -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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment