forked from noxious/server
Map event tile improvements
This commit is contained in:
@ -6,7 +6,10 @@ class SpriteRepository extends BaseRepository {
|
||||
async getById(id: UUID, populate?: any) {
|
||||
try {
|
||||
const repository = this.getEntityManager().getRepository(Sprite)
|
||||
return await repository.findOne({ id }, { populate })
|
||||
const result = await repository.findOne({ id }, { populate })
|
||||
if (result) result.setEntityManager(this.getEntityManager())
|
||||
|
||||
return result
|
||||
} catch (error: any) {
|
||||
return null
|
||||
}
|
||||
|
Reference in New Issue
Block a user