diff --git a/src/Pages/GroupTasks/GroupTypeSelectionModal.js b/src/Pages/GroupTasks/GroupTypeSelectionModal.js index 8fb907d..ec37ad1 100644 --- a/src/Pages/GroupTasks/GroupTypeSelectionModal.js +++ b/src/Pages/GroupTasks/GroupTypeSelectionModal.js @@ -47,24 +47,30 @@ export default function GroupTypeSelectionModal({ }; const handleStartTask = () => { - const userSpecifiedGlobalInputs = document - .getElementById("groupTypeSelectionUserSpecifiedGlobalInput") - .getElementsByTagName("input"); + const userSpecifiedGlobalInputForm = document.getElementById( + "groupTypeSelectionUserSpecifiedGlobalInputForm" + ); let globalInputs = []; let canTaskBeStarted = true; - if (userSpecifiedGlobalInputs.length > 0) { - for (let i = 0; i < userSpecifiedGlobalInputs.length; i++) { - if (userSpecifiedGlobalInputs[i].value === "") { - canTaskBeStarted = false; - break; - } + if (userSpecifiedGlobalInputForm !== null) { + const userSpecifiedGlobalInputs = document + .getElementById("groupTypeSelectionUserSpecifiedGlobalInputForm") + .getElementsByTagName("input"); - globalInputs.push({ - parameterName: userSpecifiedGlobalInputs[i].id, - value: userSpecifiedGlobalInputs[i].value, - }); + if (userSpecifiedGlobalInputs.length > 0) { + for (let i = 0; i < userSpecifiedGlobalInputs.length; i++) { + if (userSpecifiedGlobalInputs[i].value === "") { + canTaskBeStarted = false; + break; + } + + globalInputs.push({ + parameterName: userSpecifiedGlobalInputs[i].id, + value: userSpecifiedGlobalInputs[i].value, + }); + } } } @@ -219,7 +225,7 @@ function GroupGlobalInputs({