Skip to content

Commit 8f9599d

Browse files
committed
BUG: Undefined answer for salt challenge check
1 parent 93cac1d commit 8f9599d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

trainingportal/static/submitCodeCtrl.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,9 @@ app.controller("submitCodeCtrl", function($scope, $http, $routeParams) {
4242
var moduleId = $routeParams.moduleId;
4343
var challengeId = $routeParams.challengeId;
4444
var challengeType = $routeParams.challengeType;
45-
var answerValue = answer.value;
45+
var answerValue = "";
46+
if(typeof answer !== "undefined") answerValue = answer.value;
47+
4648
var challengeCodeValue = "";
4749
if(typeof challengeCode !== "undefined"){
4850
challengeCodeValue = challengeCode.value

0 commit comments

Comments
 (0)