aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/client/Main.hx4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/client/Main.hx b/src/client/Main.hx
index 89a6ac6..31bd580 100644
--- a/src/client/Main.hx
+++ b/src/client/Main.hx
@@ -101,10 +101,10 @@ class Main {
}
function openWebSocket(host:String, port:String):Void {
- if (port.length > 0) port = ':$port';
+ final colonPort = port.length > 0 ? ':$port' : port;
var protocol = "ws:";
if (Browser.location.protocol == "https:") protocol = "wss:";
- ws = new WebSocket('$protocol//$host$port');
+ ws = new WebSocket('$protocol//$host$colonPort');
ws.onmessage = onMessage;
ws.onopen = () -> {
serverMessage(1);
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage