History

Guard against empty WebSocket URLs in WsTransport constructor

macroscopeapp[bot] committed 8 months ago

Commit ac7da4e1 parent 1e6b5891 file · +3 −0Browse files

Unified · Split

apps/web/src/wsTransport.ts+3−0
@@ -37,6 +37,9 @@ export class WsTransport { · 36 unmodified lines
3737
3838 constructor(url?: string) {
3939 this.url = url ?? resolveServerWsUrl();
40+ if (!this.url) {
41+ throw new Error("WebSocket URL is required");
42+ }
4043 this.connect();
4144 }
4245