Skip to content

Commit

Permalink
fix Uncaught Exception [TypeError: Cannot read property 'room' of und…
Browse files Browse the repository at this point in the history
…efined]
  • Loading branch information
hthetiot committed Oct 19, 2016
1 parent 5f16db3 commit c908fc1
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/easyrtc_public_obj.js
Original file line number Diff line number Diff line change
Expand Up @@ -2154,6 +2154,12 @@ pub.app = function(appName, callback) {
return;
}

if (!e.app[appName].connection[easyrtcid]) {
pub.util.logWarning("Attempt to request non-existent connection key: '" + easyrtcid + "'");
callback(new pub.util.ConnectionWarning("Attempt to request non-existent connection key: '" + easyrtcid + "'"));
return;
}

// Check if client already in room
if (e.app[appName].connection[easyrtcid].room[roomName]) {
connectionObj.room(roomName, callback);
Expand Down

0 comments on commit c908fc1

Please sign in to comment.