diff --git a/src/api/client.ts b/src/api/client.ts index 8455e5f8..89b880fd 100644 --- a/src/api/client.ts +++ b/src/api/client.ts @@ -37,7 +37,7 @@ export interface AppAuthenticationRequest { export class WsClient extends Emittery { socket: IsoWebSocket; url: URL | undefined; - options: WsClientOptions | undefined; + options: WsClientOptions; private pendingRequests: Record; private index: number; private authenticationToken: AppAuthenticationToken | undefined; @@ -48,7 +48,7 @@ export class WsClient extends Emittery { this.registerCloseListener(socket); this.socket = socket; this.url = url; - this.options = options; + this.options = options || {}; this.pendingRequests = {}; this.index = 0; }