Check for presence of RfC Modal before hiding

Fix CODEOCEAN-FRONTEND-E
This commit is contained in:
Sebastian Serth
2023-08-16 23:11:12 +02:00
parent 57ff38c2b1
commit 71acb0cf3d

View File

@ -385,7 +385,10 @@ var CodeOceanEditor = {
$(document).unbind('keydown');
this.teardownWorkspaceButtons();
this.teardownRequestForComments();
bootstrap.Modal.getInstance($('#comment-modal'))?.hide();
const rfcModal = $('#comment-modal');
if (rfcModal.isPresent()) {
bootstrap.Modal.getInstance(rfcModal)?.hide();
}
this.teardownFileTreeButtons();
},