From f3e0d6e03a74e9c22a6a8eb46d0aefdb9d4e3241 Mon Sep 17 00:00:00 2001 From: Dennis Postma Date: Sun, 16 Feb 2025 19:16:50 +0100 Subject: [PATCH] Redundant checks --- 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 cf1d0c9..646a6e7 100644 --- a/src/services/characterTeleportService.ts +++ b/src/services/characterTeleportService.ts @@ -25,8 +25,8 @@ class CharacterTeleportService { const { socket, targetMap, mapCharacter } = await this.validateTeleportRequest(characterId, options) if (!socket || !targetMap || !mapCharacter) return false - const currentMapId = mapCharacter.character.map?.id - const currentMap = MapManager.getMapById(currentMapId!) + const currentMapId = mapCharacter.character.map.id + const currentMap = MapManager.getMapById(currentMapId) const io = SocketManager.getIO() // Update character position and map