Skip to content

Issue with _id working for chats #7

Description

@marcusmaximusiv

I have added data into the mongodb atlas database and the Error i am getting is below:

TypeError: Cannot read property '_id' of undefined
ChatPage.submitChatMessage
src/components/views/ChatPage/ChatPage.js:97
94 |
95 |
96 | let chatMessage = this.state.chatMessage

97 | let userId = this.props.user.userData._id
| ^ 98 | let userName = this.props.user.userData.name;
99 | let userImage = this.props.user.userData.image;
100 | let nowTime = moment();

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions