You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-12-20 20:42:03 +03:00
Add typeof check for body
This commit is contained in:
@@ -60,7 +60,7 @@ function getHtmlReplyFallback(mxEvent: MatrixEvent): string {
|
||||
|
||||
function getTextReplyFallback(mxEvent: MatrixEvent): string {
|
||||
const body = mxEvent.getContent().body;
|
||||
if (!body) {
|
||||
if (!body || typeof body !== 'string') {
|
||||
return "";
|
||||
}
|
||||
const lines = body.split("\n").map(l => l.trim());
|
||||
|
||||
Reference in New Issue
Block a user