Skip to content

Issue with _id working for chats #7

@marcusmaximusiv

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();

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