edge case where realtime server is passing empty object

This commit is contained in:
Connor Turland 2017-02-10 11:45:05 -05:00 committed by GitHub
parent 915defcd1b
commit 26dfcbf823

View file

@ -82,7 +82,7 @@ class MapCard extends Component {
render = () => {
const { map, mobile, juntoState, currentUser, onRequest, onStar } = this.props
const hasMap = juntoState.liveMaps[map.id]
const hasMap = juntoState.liveMaps[map.id] && values(juntoState.liveMaps[map.id]).length
const hasConversation = hasMap && find(values(hasMap), v => v === IN_CONVERSATION)
const hasMapper = hasMap && !hasConversation
const mapperList = hasMap && Object.keys(hasMap).map(id => juntoState.connectedPeople[id])