diff --git a/src/app/helpers/validators/map.ts b/src/app/helpers/validators/map.ts index ad75040..51c7abf 100644 --- a/src/app/helpers/validators/map.ts +++ b/src/app/helpers/validators/map.ts @@ -149,6 +149,8 @@ export function checkMapSpawners(mod: IModKit): ValidationMessageGroup[] { mod.maps.forEach((map) => { map.map.layers[10].objects.forEach((spawner: any) => { + if (!spawner.properties) return; + addModSpawnerCount(spawner.properties.tag as string); addUsedSpawnerCount(spawner.properties.tag as string); diff --git a/src/app/helpers/validators/npc.ts b/src/app/helpers/validators/npc.ts index 37528b8..2310e24 100644 --- a/src/app/helpers/validators/npc.ts +++ b/src/app/helpers/validators/npc.ts @@ -42,7 +42,7 @@ export function checkNPCUsages(mod: IModKit) { mod.maps.forEach((map) => { map.map.layers[10].objects.forEach((spawner: any) => { - if (spawner.properties.lairName) { + if (spawner.properties?.lairName) { addItemCount(spawner.properties.lairName as string); } });