From db9557108ceb69de5fec90a632c4c3b8e2c103f9 Mon Sep 17 00:00:00 2001 From: Jan Graichen Date: Thu, 18 Oct 2018 21:03:46 +0200 Subject: [PATCH] Fix missing dot Actually call replace on the filename. --- app/assets/javascripts/editor/submissions.js.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/assets/javascripts/editor/submissions.js.erb b/app/assets/javascripts/editor/submissions.js.erb index 21250f7e..a111a77f 100644 --- a/app/assets/javascripts/editor/submissions.js.erb +++ b/app/assets/javascripts/editor/submissions.js.erb @@ -174,7 +174,7 @@ CodeOceanEditorSubmissions = { this.createSubmission('#test', null, function(response) { this.showSpinner($('#test')); $('#score_div').addClass('hidden'); - var url = response.test_url.replace(this.FILENAME_URL_PLACEHOLDER, this.active_file.filenamereplace(/#$/,'')); // remove # if it is the last character, this is not part of the filename and just an anchor + var url = response.test_url.replace(this.FILENAME_URL_PLACEHOLDER, this.active_file.filename.replace(/#$/,'')); // remove # if it is the last character, this is not part of the filename and just an anchor this.initializeSocketForTesting(url); }.bind(this)); }