From a852eaedd34741314511ac7631a34d27f52d6028 Mon Sep 17 00:00:00 2001 From: Adam Goldsmith Date: Thu, 10 Sep 2020 17:52:29 -0400 Subject: [PATCH] Fix websocket URI generation --- src/App.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/App.vue b/src/App.vue index 4bf3525..a41df54 100644 --- a/src/App.vue +++ b/src/App.vue @@ -27,7 +27,7 @@ export default class App extends Vue { mounted() { let loc = window.location; const ws_uri: string = - loc.protocol === 'https' ? 'wss://' : 'ws://' + loc.host + '/ws'; + (loc.protocol === 'https:' ? 'wss://' : 'ws://') + loc.host + '/ws'; this.websocket = new WebSocket(ws_uri); this.websocket.onmessage = (ev: MessageEvent) => { const event: messages.ExtendedMessage = JSON.parse(ev.data as string);