Skip to content

Commit

Permalink
manywho#1: Check for null rooms to fix flowout in Salesforce console
Browse files Browse the repository at this point in the history
  • Loading branch information
chelling committed Jun 27, 2017
1 parent 3ae067a commit e7f9017
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions js/services/collaboration.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ manywho.collaboration = (function (manywho) {

var stateId = manywho.utils.extractStateId(flowKey);

if (socket && rooms[stateId].isEnabled) {
if (socket && rooms[stateId] && rooms[stateId].isEnabled) {

data = data || {};
data.stateId = stateId;
Expand Down Expand Up @@ -243,7 +243,7 @@ manywho.collaboration = (function (manywho) {

var stateId = manywho.utils.extractStateId(flowKey);

if (socket && rooms[stateId].isEnabled) {
if (socket && rooms[stateId] && rooms[stateId].isEnabled) {

rooms[stateId].user = user;
emit(flowKey, 'join', { user: user });
Expand Down

0 comments on commit e7f9017

Please sign in to comment.