From e90009772d0c2955e8caeecb1fc4f81d83b61afa Mon Sep 17 00:00:00 2001 From: "J. Ryan Stinnett" Date: Fri, 15 Jan 2021 11:21:52 +0000 Subject: [PATCH] Fix React warnings about missing key for edited messages This uses a fragment instead of an array to avoid the need for key attributes. --- src/components/views/messages/TextualBody.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/views/messages/TextualBody.js b/src/components/views/messages/TextualBody.js index 8f153e48e9..bf0884a2f3 100644 --- a/src/components/views/messages/TextualBody.js +++ b/src/components/views/messages/TextualBody.js @@ -410,7 +410,10 @@ export default class TextualBody extends React.Component { ref: this._content, }); if (this.props.replacingEventId) { - body = [body, this._renderEditedMarker()]; + body = <> + {body} + {this._renderEditedMarker()} + ; } if (this.props.highlightLink) {