Skip to content
This repository has been archived by the owner on Sep 26, 2023. It is now read-only.

Commit

Permalink
Merge pull request #2 from chelling/feature/1-salesforce-console-flowout
Browse files Browse the repository at this point in the history
#1: Check for null rooms to fix flowout in Salesforce console
  • Loading branch information
matt-manywho authored Jul 3, 2017
2 parents 9756636 + e7f9017 commit bfea022
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 bfea022

Please sign in to comment.