Change order of autosave and clearing of editors when submitting code

This commit is contained in:
Sebastian Serth
2021-12-16 11:54:31 +01:00
parent b3b0fa5724
commit 416135daf0

View File

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