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() {
|
'Ctrl-Enter': function() {
|
||||||
|
isInitRun = false;
|
||||||
bonfireExecute(true);
|
bonfireExecute(true);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -415,9 +416,6 @@ var testSuccess = function() {
|
|||||||
if (goodTests === tests.length) {
|
if (goodTests === tests.length) {
|
||||||
return showCompletion();
|
return showCompletion();
|
||||||
}
|
}
|
||||||
|
|
||||||
// test unsuccessful, make sure initRun is set to false
|
|
||||||
isInitRun = false;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
function showCompletion() {
|
function showCompletion() {
|
||||||
@ -762,6 +760,7 @@ function bonfireExecute(shouldTest) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$('#submitButton').on('click', function() {
|
$('#submitButton').on('click', function() {
|
||||||
|
isInitRun = false;
|
||||||
bonfireExecute(true);
|
bonfireExecute(true);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user