From d84aa181747811bca444d9fad2ac11e352ed610a Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Thu, 31 Aug 2023 18:31:43 -0400 Subject: [PATCH] refactor: make uris default to an empty array --- src/transports/base.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/transports/base.ts b/src/transports/base.ts index f6d775d..c6fe575 100644 --- a/src/transports/base.ts +++ b/src/transports/base.ts @@ -8,7 +8,7 @@ export abstract class BasePeer implements Peer { challenge: Uint8Array; protected _socket: any; - constructor({ socket, uris }: PeerConstructorOptions) { + constructor({ socket, uris = [] }: PeerConstructorOptions) { this.connectionUris = uris.map((uri) => new URL(uri.toString())); this.challenge = new Uint8Array(); this._socket = socket;