From 406aeef46105171e8a51f0f6c15c57432f7d6950 Mon Sep 17 00:00:00 2001 From: Sebastian Serth Date: Tue, 10 Nov 2020 02:26:21 +0100 Subject: [PATCH] Use includes instead of endsWith (due to query parameters) --- app/assets/javascripts/editor.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/assets/javascripts/editor.js b/app/assets/javascripts/editor.js index e0468936..465e2f49 100644 --- a/app/assets/javascripts/editor.js +++ b/app/assets/javascripts/editor.js @@ -14,7 +14,7 @@ $(document).on('turbolinks:load', function(event) { CodeOceanEditorRequestForComments ); - if ($('#editor').isPresent() && CodeOceanEditor && event.originalEvent.data.url.endsWith("/implement")) { + if ($('#editor').isPresent() && CodeOceanEditor && event.originalEvent.data.url.includes("/implement")) { if (CodeOceanEditor.isBrowserSupported()) { $('#alert').hide(); // This call will (amon other things) initializeEditors and load the content except for the last line