Skip to content

Commit

Permalink
Remove extra scoping
Browse files Browse the repository at this point in the history
  • Loading branch information
jorg-vr committed Sep 22, 2023
1 parent c15e573 commit d916d75
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions app/views/evaluations/show.js.erb
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
dodona.setHTMLExecuteScripts(document.querySelector("#evaluation-table-wrapper"), "<%= escape_javascript(render 'evaluation_table', feedbacks: @feedbacks, evaluation: @evaluation, users: @users) %>")
{
const gradeTable = document.querySelector("#evaluation-grade-table-wrapper");
if(gradeTable) {
dodona.setHTMLExecuteScripts(gradeTable, "<%= escape_javascript(render 'evaluation_grade_table', feedbacks: @feedbacks, evaluation: @evaluation, users: @users) %>")
}
const gradeTable = document.querySelector("#evaluation-grade-table-wrapper");
if(gradeTable) {
dodona.setHTMLExecuteScripts(gradeTable, "<%= escape_javascript(render 'evaluation_grade_table', feedbacks: @feedbacks, evaluation: @evaluation, users: @users) %>")
}

0 comments on commit d916d75

Please sign in to comment.