Change order of autosave and clearing of editors when submitting code
This commit is contained in:
@ -196,9 +196,9 @@ CodeOceanEditorSubmissions = {
|
||||
const button = $(event.target) || $('#submit');
|
||||
this.createSubmission(button, null, function (response) {
|
||||
if (response.redirect) {
|
||||
this.unloadAutoSave();
|
||||
this.editors = [];
|
||||
Turbolinks.clearCache();
|
||||
clearTimeout(this.autosaveTimer);
|
||||
Turbolinks.visit(response.redirect);
|
||||
} else if (response.status === 'container_depleted') {
|
||||
this.showContainerDepletedMessage();
|
||||
|
Reference in New Issue
Block a user