mirror of
https://github.com/vector-im/element-web.git
synced 2026-05-05 12:16:53 +02:00
Merge pull request #3596 from matrix-org/dbkr/fix_editing_softcrash
Fix softcrash if editing silly events
This commit is contained in:
commit
e2acc90fbf
@ -52,6 +52,7 @@ export function canEditContent(mxEvent) {
|
||||
const content = mxEvent.getOriginalContent();
|
||||
const {msgtype} = content;
|
||||
return (msgtype === "m.text" || msgtype === "m.emote") &&
|
||||
content.body && typeof content.body === 'string' &&
|
||||
mxEvent.getSender() === MatrixClientPeg.get().getUserId();
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user