From daeb232d3b875625f137d1bc75bc752adca61f4d Mon Sep 17 00:00:00 2001
From: Dennis Postma <dennis@directonline.io>
Date: Sat, 15 Feb 2025 22:30:22 +0100
Subject: [PATCH] Silly typescript

---
 src/services/characterTeleportService.ts | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/services/characterTeleportService.ts b/src/services/characterTeleportService.ts
index f6f1b00..0402305 100644
--- a/src/services/characterTeleportService.ts
+++ b/src/services/characterTeleportService.ts
@@ -36,7 +36,7 @@ class CharacterTeleportService {
 
     const existingCharacter = !options.isInitialJoin && MapManager.getCharacterById(characterId)
     const mapCharacter = options.isInitialJoin
-      ? new MapCharacter(options.character)
+      ? new MapCharacter(options.character!)
       : existingCharacter ||
         (() => {
           this.logger.error(`Teleport failed - Character ${characterId} not found in MapManager`)
@@ -83,7 +83,7 @@ class CharacterTeleportService {
       targetMap.addCharacter(mapCharacter.getCharacter())
 
       const map = await mapRepository.getById(options.targetMapId)
-      await mapRepository.getEntityManager().populate(map, mapRepository.POPULATE_TELEPORT as any)
+      await mapRepository.getEntityManager().populate(map!, mapRepository.POPULATE_TELEPORT as any)
 
       // Notify clients
       io.in(options.targetMapId).emit(SocketEvent.MAP_CHARACTER_JOIN, mapCharacter)