flatten connectall

This commit is contained in:
tiagosiebler
2021-02-07 11:32:35 +00:00
parent 87dc3b1c10
commit e76e6f3c40

View File

@@ -169,9 +169,9 @@ export class WebsocketClient extends EventEmitter {
/** /**
* Request connection of all dependent websockets, instead of waiting for automatic connection by library * Request connection of all dependent websockets, instead of waiting for automatic connection by library
*/ */
public connectAll(): Promise<WebSocket> | Promise<WebSocket>[] | undefined { public connectAll(): Promise<WebSocket>[] | undefined {
if (this.isInverse()) { if (this.isInverse()) {
return this.connect(wsKeyInverse); return [this.connect(wsKeyInverse)];
} }
if (this.options.linear === true) { if (this.options.linear === true) {