Merge pull request #3220 from FreeCodeCamp/fix/set-isInitRun-flag

fix modal showing when challenge already completed
This commit is contained in:
Quincy Larson
2015-09-09 20:25:53 -07:00

View File

@ -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);
});