From d916d754308f80984429e91988ddc97a2712978d Mon Sep 17 00:00:00 2001 From: jorg-vr Date: Fri, 22 Sep 2023 13:24:12 +0200 Subject: [PATCH] Remove extra scoping --- app/views/evaluations/show.js.erb | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/app/views/evaluations/show.js.erb b/app/views/evaluations/show.js.erb index 0130fdaf5d..4ba37586ce 100644 --- a/app/views/evaluations/show.js.erb +++ b/app/views/evaluations/show.js.erb @@ -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) %>") }