mirror of
https://github.com/ENSL/ensl_gathers.git
synced 2024-11-23 12:52:15 +00:00
Fix render for empty message updates
This commit is contained in:
parent
4cc80c48a6
commit
5f4fbabbc1
1 changed files with 5 additions and 3 deletions
|
@ -23,11 +23,13 @@ var Chatroom = React.createClass({
|
|||
},
|
||||
|
||||
render() {
|
||||
let messages = this.props.messages.map(message =>
|
||||
<ChatMessage message={message}
|
||||
let messages = this.props.messages.map(message => {
|
||||
if (message) {
|
||||
return <ChatMessage message={message}
|
||||
key={message.id}
|
||||
user={this.props.user} />
|
||||
);
|
||||
}
|
||||
});
|
||||
return (
|
||||
<div className="panel panel-primary chatbox">
|
||||
<div className="panel-heading">Gather Chat</div>
|
||||
|
|
Loading…
Reference in a new issue