From 61513cc5bcc96171a99d73a34eeeafc200ec60f2 Mon Sep 17 00:00:00 2001 From: Sebastian Serth Date: Wed, 8 May 2024 22:34:28 +0300 Subject: [PATCH] Revert "Fix race condition on JavaScript initializer" This reverts commit 88c6be88, since it is no longer needed after fixing the root cause in a076da41. --- app/assets/javascripts/channels/synchronized_editor_channel.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/assets/javascripts/channels/synchronized_editor_channel.js b/app/assets/javascripts/channels/synchronized_editor_channel.js index 2a02a8c8..6f909328 100644 --- a/app/assets/javascripts/channels/synchronized_editor_channel.js +++ b/app/assets/javascripts/channels/synchronized_editor_channel.js @@ -4,7 +4,7 @@ $(document).on('turbolinks:load', function () { var editor = $('#editor'); var exercise_id = editor.data('exercise-id'); - if ($.isController('exercises') && typeof ProgrammingGroups !== 'undefined' && ProgrammingGroups.is_other_user(current_contributor)) { + if ($.isController('exercises') && ProgrammingGroups.is_other_user(current_contributor)) { App.synchronized_editor = App.cable.subscriptions.create({ channel: "SynchronizedEditorChannel", exercise_id: exercise_id