From d2b2deaf98cf3f494fd234831d2c6737fc007dc7 Mon Sep 17 00:00:00 2001 From: Sebastian Serth Date: Sun, 5 Nov 2023 23:43:32 +0100 Subject: [PATCH] Use `var` for window-wide variables Otherwise, Turbolinks might cause an issue... Fixes CODEOCEAN-FRONTEND-H --- .../javascripts/channels/synchronized_editor_channel.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/assets/javascripts/channels/synchronized_editor_channel.js b/app/assets/javascripts/channels/synchronized_editor_channel.js index e6351621..6f909328 100644 --- a/app/assets/javascripts/channels/synchronized_editor_channel.js +++ b/app/assets/javascripts/channels/synchronized_editor_channel.js @@ -1,8 +1,8 @@ $(document).on('turbolinks:load', function () { if (window.location.pathname.includes('/implement')) { - const editor = $('#editor'); - const exercise_id = editor.data('exercise-id'); + var editor = $('#editor'); + var exercise_id = editor.data('exercise-id'); if ($.isController('exercises') && ProgrammingGroups.is_other_user(current_contributor)) {