Unsubscribe from channel when redirecting

fixes CODEOCEAN-FRONTEND-2S
This commit is contained in:
kiragrammel
2023-09-04 11:09:31 +02:00
committed by Sebastian Serth
parent 23a95d315d
commit 0e4a239960
2 changed files with 4 additions and 0 deletions

View File

@ -204,6 +204,7 @@ CodeOceanEditorSubmissions = {
this.teardownEventHandlers();
this.createSubmission(button, null, function (response) {
if (response.redirect) {
App.synchronized_editor?.unsubscribe();
this.autosaveIfChanged();
this.stopCode(event);
this.editors = [];