forked from noxious/server
More typescript improvements
This commit is contained in:
@ -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).' })
|
||||
}
|
||||
|
Reference in New Issue
Block a user