refactor: make uris default to an empty array

This commit is contained in:
Derrick Hammer 2023-08-31 18:31:43 -04:00
parent 1f391c15b1
commit d84aa18174
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 1 additions and 1 deletions

View File

@ -8,7 +8,7 @@ export abstract class BasePeer implements Peer {
challenge: Uint8Array; challenge: Uint8Array;
protected _socket: any; protected _socket: any;
constructor({ socket, uris }: PeerConstructorOptions) { constructor({ socket, uris = [] }: PeerConstructorOptions) {
this.connectionUris = uris.map((uri) => new URL(uri.toString())); this.connectionUris = uris.map((uri) => new URL(uri.toString()));
this.challenge = new Uint8Array(); this.challenge = new Uint8Array();
this._socket = socket; this._socket = socket;