Reuse jQuery selector where possible

This commit is contained in:
Sebastian Serth
2023-12-22 00:45:44 +01:00
committed by Sebastian Serth
parent affeb2d3ba
commit 5b35ccdfe8
2 changed files with 6 additions and 4 deletions

View File

@@ -163,7 +163,7 @@ CodeOceanEditorSubmissions = {
this.startSentryTransaction(cause);
event.preventDefault();
this.stopCode(event);
if ($('#run').is(':visible')) {
if (cause.is(':visible')) {
this.createSubmission(cause, null, this.runSubmission.bind(this));
}
},