fixed displayName error

master
Stefan Otto 2019-10-30 14:59:34 +01:00
parent a003bcdef0
commit 9256d4c751
1 changed files with 2 additions and 2 deletions

View File

@ -736,11 +736,11 @@ class Room extends EventEmitter
case 'changeDisplayName': case 'changeDisplayName':
{ {
// Ensure the Peer is joined. // Ensure the Peer is joined.
if (!peer.data.joined) if (!peer.joined)
throw new Error('Peer not yet joined'); throw new Error('Peer not yet joined');
const { displayName } = request.data; const { displayName } = request.data;
const oldDisplayName = peer.data.displayName; const oldDisplayName = peer.displayName;
peer.displayName = displayName; peer.displayName = displayName;