Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hi I am facing this problem #3

Open
Shanto96 opened this issue Mar 25, 2021 · 2 comments
Open

Hi I am facing this problem #3

Shanto96 opened this issue Mar 25, 2021 · 2 comments

Comments

@Shanto96
Copy link

TypeError: Cannot read property 'username' of undefined

When
6 | const isFirstMessageByUser = !lastMessage || lastMessage.sender.username!==message.sender.username;

when the lastMessage is undefined like messages[null]

@ydroopert
Copy link

Hi! would need a bit more detail but I would say it should be one of the two following problems.
1.
You forgot to declare it first:

const TheirMessage = ({ lastMessage, message }) => {
const isFirstMessageByUser = !lastMessage || lastMessage.sender.username !== message.sender.username;

  1. You didn't pass in the props properly in ChatFeed.jsx:

{isMyMessage
?
: }

@princemore101
Copy link

hey !! i have a problem , I am not able to see the message which i send i get 429 error in the console window . please help me with the problem as soon as possible .

Screenshot 2021-05-08 215111

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants