diff --git a/src/movement/Movement.ts b/src/movement/Movement.ts index 1bd36306e..4d851d5d4 100644 --- a/src/movement/Movement.ts +++ b/src/movement/Movement.ts @@ -463,7 +463,7 @@ export class Movement { if (isPowerZerg(creep)) { return MovePriorities.powerCreep; } else { - return MovePriorities[creep.memory.role] || MovePriorities.default; + return (creep.memory.role in MovePriorities) ? MovePriorities[creep.memory.role] : MovePriorities.default; } } }