Unverified Commit 44d2b4b0 authored by Reinaldo Neto's avatar Reinaldo Neto Committed by GitHub
Browse files

[FIX] makeThreadName asserting undefined as non-null (#3628)

parent 9d25636c
......@@ -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;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment