From 7de6a457eed7a9d17a8f1772c4065300a517cda8 Mon Sep 17 00:00:00 2001 From: Oliver-Akins Date: Mon, 28 Sep 2020 22:33:51 -0600 Subject: [PATCH] Short circuit boolean if the ws_uri is null. --- src/main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.js b/src/main.js index 45bedcb..cbac006 100644 --- a/src/main.js +++ b/src/main.js @@ -15,7 +15,7 @@ if (qs.get(`ws-uri`)) { // http://localhost:8080/?ws-uri=localhost:3000 -while (ws_uri.length == 0 || !ws_uri.match(/^(wss?|https?):\/\//)) { +while ((!ws_uri || ws_uri.length == 0) || !ws_uri.match(/^(wss?|https?):\/\//)) { ws_uri = prompt("Input a websocket URI to connect to"); }