Getting new js error in calendar events

Options

Recently started seeing the following type of error in Chrome Dev Tools on calendar event registration pages:

Ticketing?view=Tickets&id=104521:8059 Uncaught TypeError: Cannot set properties of null (setting 'innerHTML')
at block7201 (Ticketing?view=Tickets&id=104521:8059:21)

When I view the code, I'm seeing that the error is happening in some code that looks like this:

for (let i = table.length; i < input; i++) {
const id = `ticketQuestionTable_7201${i}`
container.insertAdjacentHTML('beforeend', `<table name="ticketQuestionTable_7201" id=${id} border="0" cellspacing="4" cellpadding="0" summary="Additional information necessary to complete as part of ticket purchase"></table>`);
const table = document.getElementById(id);
const input1 = table.getElementsByTagName('input');
const input2 = table.getElementsByTagName('select');
[...input1].forEach(item => item.setAttribute("name", item.getAttribute("name")+'_'+`${i}`));
[...input2].forEach(item => item.setAttribute("name", item.getAttribute("name")+'_'+`${i}`));
}
}
if (table.length === 0) {
container.innerHTML = ''; // ERROR IS HERE – “container” value is null
}
}
</script>

Anyone know where to find this code? Is this something that only BB has access to?

Tagged:

Comments

Categories