diff --git a/public/scripts/network.js b/public/scripts/network.js index d624812..0083814 100644 --- a/public/scripts/network.js +++ b/public/scripts/network.js @@ -694,6 +694,11 @@ class RTCPeer extends Peer { _isConnecting() { return this._channel && this._channel.readyState === 'connecting'; } + + sendDisplayName(displayName) { + if (!this._isConnected()) return; + super.sendDisplayName(displayName); + } } class PeersManager { diff --git a/public_included_ws_fallback/scripts/network.js b/public_included_ws_fallback/scripts/network.js index b745b93..c45f37a 100644 --- a/public_included_ws_fallback/scripts/network.js +++ b/public_included_ws_fallback/scripts/network.js @@ -705,6 +705,11 @@ class RTCPeer extends Peer { _isConnecting() { return this._channel && this._channel.readyState === 'connecting'; } + + sendDisplayName(displayName) { + if (!this._isConnected()) return; + super.sendDisplayName(displayName); + } } class WSPeer extends Peer {