diff --git a/src/lib/util/makeBadgeString.ts b/src/lib/util/makeBadgeString.ts index 323e87f826..a88159fdd3 100644 --- a/src/lib/util/makeBadgeString.ts +++ b/src/lib/util/makeBadgeString.ts @@ -3,6 +3,6 @@ import { badges } from '../constants'; export function makeBadgeString(user: MUser, badgeIDs: number[] | null | undefined) { const method = user.getRandomizeMethod(); const rawBadges: string[] = (badgeIDs ?? []).map(num => badges[num]); - rawBadges.push(method!.emoji); + rawBadges.push(method?.emoji ?? ''); return rawBadges.join(' ').trim(); }