clean up js check

This commit is contained in:
Rachid Mrad 2024-11-26 16:25:15 -05:00
parent 772c29bb5f
commit fe71af74f4
No known key found for this signature in database

View file

@ -14,9 +14,7 @@ export function handleRequestingEntityFieldset() {
const selectParent = select?.parentElement;
const suborgContainer = document.getElementById("suborganization-container");
const suborgDetailsContainer = document.getElementById("suborganization-container__details");
let subOrgCreateNewOption;
if (subOrgCreateNewOption)
subOrgCreateNewOption = document.getElementById("option-to-add-suborg").value;
const subOrgCreateNewOption = document.getElementById("option-to-add-suborg")?.value;
// Make sure all crucial page elements exist before proceeding.
// This more or less ensures that we are on the Requesting Entity page, and not elsewhere.
if (!radios || !select || !selectParent || !suborgContainer || !suborgDetailsContainer) return;