From 8f9599d71fb64e6917f2a496902627b1fcfcea51 Mon Sep 17 00:00:00 2001 From: paul-ion Date: Tue, 7 Jan 2025 16:26:04 -0500 Subject: [PATCH] BUG: Undefined answer for salt challenge check --- trainingportal/static/submitCodeCtrl.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/trainingportal/static/submitCodeCtrl.js b/trainingportal/static/submitCodeCtrl.js index 79596f0..c388494 100644 --- a/trainingportal/static/submitCodeCtrl.js +++ b/trainingportal/static/submitCodeCtrl.js @@ -42,7 +42,9 @@ app.controller("submitCodeCtrl", function($scope, $http, $routeParams) { var moduleId = $routeParams.moduleId; var challengeId = $routeParams.challengeId; var challengeType = $routeParams.challengeType; - var answerValue = answer.value; + var answerValue = ""; + if(typeof answer !== "undefined") answerValue = answer.value; + var challengeCodeValue = ""; if(typeof challengeCode !== "undefined"){ challengeCodeValue = challengeCode.value