1
0
forked from noxious/server

More typescript improvements

This commit is contained in:
2025-02-07 20:54:55 +01:00
parent f5e7d10fb4
commit 52b8a9b7ad
12 changed files with 35 additions and 14 deletions

View File

@ -64,7 +64,7 @@ export default class CharacterCreateEvent extends BaseEvent {
} catch (error: any) {
this.logger.error(`character:create error: ${error.message}`)
if (error instanceof ZodError) {
return this.socket.emit('notification', { title: 'Error', message: error.issues[0].message })
return this.socket.emit('notification', { title: 'Error', message: error.issues[0]!.message })
}
return this.socket.emit('notification', { title: 'Error', message: 'Could not create character. Please try again (later).' })
}