Add typeof check for body

t3chguy/dedup-icons-17oct
Florian Duros 2022-10-26 19:16:29 +02:00
parent c0282e0351
commit 39f1dc224c
No known key found for this signature in database
GPG Key ID: 9700AA5870258A0B
1 changed files with 1 additions and 1 deletions

View File

@ -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());