From 8faab600b5dd450d1aea40a7e813453d51645047 Mon Sep 17 00:00:00 2001 From: Maximilian Grundke Date: Mon, 7 May 2018 17:25:42 +0200 Subject: [PATCH] Fix nil config resulting in failing tests --- app/assets/javascripts/editor/execution.js.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/assets/javascripts/editor/execution.js.erb b/app/assets/javascripts/editor/execution.js.erb index ba432582..32035828 100644 --- a/app/assets/javascripts/editor/execution.js.erb +++ b/app/assets/javascripts/editor/execution.js.erb @@ -4,7 +4,7 @@ CodeOceanEditorWebsocket = { createSocketUrl: function(url) { var sockURL = new URL(window.location); sockURL.pathname = url; - sockURL.protocol = '<%= DockerClient.config['ws_client_protocol'].match(/(\w+):*\/*/)&.to_a&.at(1) %>:'; + sockURL.protocol = '<%= DockerClient.config['ws_client_protocol']&.match(/(\w+):*\/*/)&.to_a&.at(1) %>:'; // strip anchor if it is in the url sockURL.hash = '';