fix: guard against undefined username in trivia won event
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -74,7 +74,7 @@ export function registerDomainEventListeners() {
|
||||
fireAndForget(async () => {
|
||||
await dashboardService.recordEvent({
|
||||
type: 'success',
|
||||
message: `${payload.username} won ${payload.reward.toLocaleString()} AU from trivia!`,
|
||||
message: `${payload.username ?? 'Unknown user'} won ${payload.reward.toLocaleString()} AU from trivia!`,
|
||||
icon: '🎉'
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user