Short circuit boolean if the ws_uri is null.

This commit is contained in:
Oliver-Akins 2020-09-28 22:33:51 -06:00
parent 1bd4f55335
commit 7de6a457ee

View file

@ -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");
}