From e76e6f3c40fb4cc91fca7692862ba5c4f86d9ce5 Mon Sep 17 00:00:00 2001 From: tiagosiebler Date: Sun, 7 Feb 2021 11:32:35 +0000 Subject: [PATCH] flatten connectall --- src/websocket-client.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/websocket-client.ts b/src/websocket-client.ts index 22e266a..d21e411 100644 --- a/src/websocket-client.ts +++ b/src/websocket-client.ts @@ -169,9 +169,9 @@ export class WebsocketClient extends EventEmitter { /** * Request connection of all dependent websockets, instead of waiting for automatic connection by library */ - public connectAll(): Promise | Promise[] | undefined { + public connectAll(): Promise[] | undefined { if (this.isInverse()) { - return this.connect(wsKeyInverse); + return [this.connect(wsKeyInverse)]; } if (this.options.linear === true) {