forked from noxious/server
Map event tile improvements
This commit is contained in:
@ -5,7 +5,10 @@ class WorldRepository extends BaseRepository {
|
||||
async getFirst() {
|
||||
try {
|
||||
const repository = this.getEntityManager().getRepository(World)
|
||||
return await repository.findOne({ date: { $exists: true } })
|
||||
const result = await repository.findOne({ date: { $exists: true } })
|
||||
if (result) result.setEntityManager(this.getEntityManager())
|
||||
|
||||
return result
|
||||
} catch (error: any) {
|
||||
this.logger.error(`Failed to get first world: ${error instanceof Error ? error.message : String(error)}`)
|
||||
}
|
||||
|
Reference in New Issue
Block a user