1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-11-28 05:03:59 +03:00

Add default IContent value in makeContentExtensible (#2126)

This commit is contained in:
Germain
2022-01-24 09:28:58 +00:00
committed by GitHub
parent 230e3b4ace
commit fab7b7f26a

View File

@@ -3948,7 +3948,7 @@ export class MatrixClient extends EventEmitter {
// reasonably large pool of messages to parse.
let eventType: string = EventType.RoomMessage;
let sendContent: IContent = content as IContent;
const makeContentExtensible = (content: IContent, recurse = true): IPartialEvent<object> => {
const makeContentExtensible = (content: IContent = {}, recurse = true): IPartialEvent<object> => {
let newEvent: IPartialEvent<object> = null;
if (content['msgtype'] === MsgType.Text) {