diff --git a/webapp/channels/src/components/post_view/combined_system_message/combined_system_message.tsx b/webapp/channels/src/components/post_view/combined_system_message/combined_system_message.tsx index 5d90c13c50..ab9485eb6f 100644 --- a/webapp/channels/src/components/post_view/combined_system_message/combined_system_message.tsx +++ b/webapp/channels/src/components/post_view/combined_system_message/combined_system_message.tsx @@ -322,14 +322,15 @@ export class CombinedSystemMessage extends React.PureComponent { ); } - renderMessage(postType: string, userIds: string[], actorId?: string): JSX.Element { + renderMessage(index: number, postType: string, userIds: string[], actorId?: string): JSX.Element { return ( - + {this.renderFormattedMessage(postType, userIds, actorId)}
); } + render(): JSX.Element { const { currentUserId, @@ -337,7 +338,8 @@ export class CombinedSystemMessage extends React.PureComponent { } = this.props; const content = []; - for (const message of messageData) { + for (let i = 0; i < messageData.length; i++) { + const message = messageData[i]; const { postType, actorId, @@ -356,7 +358,7 @@ export class CombinedSystemMessage extends React.PureComponent { } } - content.push(this.renderMessage(postType, userIds, actorId)); + content.push(this.renderMessage(i, postType, userIds, actorId)); } return (