Guard against empty WebSocket URLs in WsTransport constructor
This commit is contained in:
1 parent
1e6b589c5a
commit
ac7da4e9a8
1 file changed
+3
@@ -37,6 +37,9 @@ export class WsTransport {
|
||||
|
||||
constructor(url?: string) {
|
||||
this.url = url ?? resolveServerWsUrl();
|
||||
if (!this.url) {
|
||||
throw new Error("WebSocket URL is required");
|
||||
}
|
||||
this.connect();
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user