Checking wrong element in object.

This commit is contained in:
Håvar Aambø Fosstveit
2019-10-30 22:17:48 +01:00
parent 549176b86e
commit b30011c81a
+3 -3
View File
@@ -343,7 +343,7 @@ class Room extends EventEmitter
peer.on('displayNameChanged', ({ oldDisplayName }) =>
{
// Ensure the Peer is joined.
if (!peer.data.joined)
if (!peer.joined)
throw new Error('Peer not yet joined');
// Spread to others
@@ -357,7 +357,7 @@ class Room extends EventEmitter
peer.on('pictureChanged', () =>
{
// Ensure the Peer is joined.
if (!peer.data.joined)
if (!peer.joined)
throw new Error('Peer not yet joined');
// Spread to others
@@ -787,7 +787,7 @@ class Room extends EventEmitter
case 'changePicture':
{
// Ensure the Peer is joined.
if (!peer.data.joined)
if (!peer.joined)
throw new Error('Peer not yet joined');
const { picture } = request.data;