More map editor work
This commit is contained in:
@ -28,7 +28,10 @@ class MapRepository extends BaseRepository {
|
||||
async getById(id: UUID) {
|
||||
try {
|
||||
const repository = this.getEntityManager().getRepository(Map)
|
||||
return await repository.findOne({ id })
|
||||
const result = await repository.findOne({ id })
|
||||
if (result) result.setEntityManager(this.getEntityManager())
|
||||
|
||||
return result
|
||||
} catch (error: any) {
|
||||
this.logger.error(`Failed to get map by id: ${error.message}`)
|
||||
return null
|
||||
|
Reference in New Issue
Block a user