Skip to content

Commit 10cbf08

Browse files
committed
fix: peers array assumption
1 parent b126b67 commit 10cbf08

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/backend/src/services/BroadcastService.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,8 @@ class BroadcastService extends BaseService {
8181
}
8282

8383
async _init () {
84-
for ( const peer_config of this.config.peers ) {
84+
const peers = this.config.peers ?? [];
85+
for ( const peer_config of peers ) {
8586
const peer = new Peer(this, peer_config);
8687
this.peers_.push(peer);
8788
peer.connect();

0 commit comments

Comments
 (0)