Cleaner test on body
parent
0a7f44b226
commit
aae93a9af2
src/components/views/rooms/wysiwyg_composer/utils
|
@ -44,7 +44,7 @@ function getHtmlReplyFallback(mxEvent: MatrixEvent): string {
|
||||||
|
|
||||||
function getTextReplyFallback(mxEvent: MatrixEvent): string {
|
function getTextReplyFallback(mxEvent: MatrixEvent): string {
|
||||||
const body = mxEvent.getContent().body;
|
const body = mxEvent.getContent().body;
|
||||||
if (!body || typeof body !== 'string') {
|
if (typeof body !== 'string') {
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
const lines = body.split("\n").map(l => l.trim());
|
const lines = body.split("\n").map(l => l.trim());
|
||||||
|
|
Loading…
Reference in New Issue