Fix URL detection for port resolution

This commit is contained in:
Hri7566 2024-07-12 18:20:49 -04:00
parent c7344e1bd9
commit 911b907f85
1 changed files with 1 additions and 1 deletions

View File

@ -1150,7 +1150,7 @@ $(function () {
const isSecure = globalThis.location.protocol == "https:"; const isSecure = globalThis.location.protocol == "https:";
const port = const port =
window.location.hostname == "www.multiplayerpiano.com" ? 443 : 8443; window.location.hostname == "www.multiplayerpiano.dev" ? 443 : 8443;
const gClient = new Client( const gClient = new Client(
(isSecure ? "wss://" : "ws://") + window.location.hostname + ":" + port (isSecure ? "wss://" : "ws://") + window.location.hostname + ":" + port
); );