Merge pull request #3220 from FreeCodeCamp/fix/set-isInitRun-flag
fix modal showing when challenge already completed
This commit is contained in:
@ -244,6 +244,7 @@ editor.setOption('extraKeys', {
|
||||
}
|
||||
},
|
||||
'Ctrl-Enter': function() {
|
||||
isInitRun = false;
|
||||
bonfireExecute(true);
|
||||
return false;
|
||||
}
|
||||
@ -415,9 +416,6 @@ var testSuccess = function() {
|
||||
if (goodTests === tests.length) {
|
||||
return showCompletion();
|
||||
}
|
||||
|
||||
// test unsuccessful, make sure initRun is set to false
|
||||
isInitRun = false;
|
||||
};
|
||||
|
||||
function showCompletion() {
|
||||
@ -762,6 +760,7 @@ function bonfireExecute(shouldTest) {
|
||||
}
|
||||
|
||||
$('#submitButton').on('click', function() {
|
||||
isInitRun = false;
|
||||
bonfireExecute(true);
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user