diff --git a/client/src/components/chat-affix/chat-affix.container.jsx b/client/src/components/chat-affix/chat-affix.container.jsx index 49f273ced..22ba1fdd9 100644 --- a/client/src/components/chat-affix/chat-affix.container.jsx +++ b/client/src/components/chat-affix/chat-affix.container.jsx @@ -11,6 +11,7 @@ import { connect } from "react-redux"; import { createStructuredSelector } from "reselect"; import { selectBodyshop } from "../../redux/user/user.selectors"; import { selectChatVisible } from "../../redux/messaging/messaging.selectors"; + const mapStateToProps = createStructuredSelector({ bodyshop: selectBodyshop, chatVisible: selectChatVisible, @@ -27,6 +28,8 @@ export function ChatAffixContainer({ bodyshop, chatVisible }) { if (loading) return ; if (error) return ; + if (!bodyshop || !bodyshop.messagingservicesid) return <>; + return (