SMYN: Fix author undefined. (#528)

This commit is contained in:
Etorix 2025-11-26 18:10:49 -08:00 • committed by GitHub
parent 62569ef3be
commit b6d8728b64
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -267,7 +267,7 @@ function getProcessedNames(author: any, truncateAllNamesWithStreamerMode: boolea
? friendName[0] + "..."
: friendName as string;
const customName: string | null = customNicknames[author.id] || null;
const customName: string | null = !author?.id ? null : customNicknames[author.id] || null;
const custom: string | null = !customName ? null
: StreamerModeStore.enabled && (truncateAllNamesWithStreamerMode || customName.toLowerCase() === author.username.toLowerCase())
? customName[0] + "..."