Don't throw on not joined.
This commit is contained in:
+2
-2
@@ -344,7 +344,7 @@ class Room extends EventEmitter
|
|||||||
{
|
{
|
||||||
// Ensure the Peer is joined.
|
// Ensure the Peer is joined.
|
||||||
if (!peer.joined)
|
if (!peer.joined)
|
||||||
throw new Error('Peer not yet joined');
|
return;
|
||||||
|
|
||||||
// Spread to others
|
// Spread to others
|
||||||
this._notification(peer.socket, 'changeDisplayName', {
|
this._notification(peer.socket, 'changeDisplayName', {
|
||||||
@@ -358,7 +358,7 @@ class Room extends EventEmitter
|
|||||||
{
|
{
|
||||||
// Ensure the Peer is joined.
|
// Ensure the Peer is joined.
|
||||||
if (!peer.joined)
|
if (!peer.joined)
|
||||||
throw new Error('Peer not yet joined');
|
return;
|
||||||
|
|
||||||
// Spread to others
|
// Spread to others
|
||||||
this._notification(peer.socket, 'changePicture', {
|
this._notification(peer.socket, 'changePicture', {
|
||||||
|
|||||||
Reference in New Issue
Block a user