[FIX] makeThreadName asserting undefined as non-null (#3628)
This commit is contained in:
parent
9d25636cf4
commit
44d2b4b0e1
|
@ -60,6 +60,6 @@ export const getBadgeColor = ({
|
|||
};
|
||||
|
||||
export const makeThreadName = (messageRecord: { id?: string; msg?: string; attachments?: IAttachment[] }): string | undefined =>
|
||||
messageRecord.msg || messageRecord.attachments![0].title;
|
||||
messageRecord.msg || messageRecord?.attachments?.[0]?.title;
|
||||
|
||||
export const isTeamRoom = ({ teamId, joined }: { teamId: string; joined: boolean }): boolean => !!teamId && joined;
|
||||
|
|
Loading…
Reference in New Issue