1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-11-07 10:46:24 +03:00

silence react warning when showing edited marker, by also giving the body a key

This commit is contained in:
Bruno Windels
2019-05-17 13:31:26 +01:00
parent 4c94b398d3
commit 76ceee0e6c

View File

@@ -541,8 +541,8 @@ export function bodyToHtml(content, highlights, opts={}) {
});
return isDisplayedWithHtml ?
<span className={className} dangerouslySetInnerHTML={{ __html: safeBody }} dir="auto" /> :
<span className={className} dir="auto">{ strippedBody }</span>;
<span key="body" className={className} dangerouslySetInnerHTML={{ __html: safeBody }} dir="auto" /> :
<span key="body" className={className} dir="auto">{ strippedBody }</span>;
}
export function emojifyText(text, addAlt) {