started the application in development mode with npm start.
sent messages from 2 clients, so now i have chat list.
didn't select any of chat list items.
What happened:
message box area on right side is blank, I expect it to show the message No chat selected
as I went through the MessageList component's code.
Reproduction repository:
Problem description:
In renderEmpty method of MessageList there are two if blocks , first one is working as expected but the second one have a condition is as follow :
if (chat.hasOwnProperty('open')) {
return (
<div className="MessageList__empty">
<div className="ss-icon ss-mailbox lil-mailbox" />
<div>No chat selected</div>
<div style={{ fontSize: '12px', padding: '10px' }}>Click a chat on the left to get started!</div>
</div>
);
}
I don't know if it was working previously or not , but I don't think if no chat is selected the open key will be present in chat and so the if block will be useless.
Suggested solution:
I have tried removing the if condition and returning template directly , It works as expected in both cases , when chat list is empty and when no chat is selected. Let me know if there is anything I am missing, if not then I will create a pull request updating it.
node
version: v8.12.0npm
(oryarn
) version: 6.4.1Relevant code or config
What you did:
What happened:
No chat selected
as I went through theMessageList
component's code.Reproduction repository:
Problem description:
In
renderEmpty
method ofMessageList
there are two if blocks , first one is working as expected but the second one have a condition is as follow :I don't know if it was working previously or not , but I don't think if no chat is selected the
open
key will be present in chat and so the if block will be useless.Suggested solution: I have tried removing the if condition and returning template directly , It works as expected in both cases , when chat list is empty and when no chat is selected. Let me know if there is anything I am missing, if not then I will create a pull request updating it.