1
0
forked from 0ad/0ad

protection against JS warning

This was SVN commit r16319.
This commit is contained in:
mimo 2015-02-11 20:27:04 +00:00
parent cd9eeef1b7
commit b239bcd8b9

View File

@ -1792,7 +1792,7 @@ m.AttackPlan.prototype.removeTrainingUnitsFromPlan = function(gameState)
{
for (let trainer of gameState.getOwnTrainingFacilities().values())
for (let item of trainer.trainingQueue())
if (item.metadata && item.metadata.plan == this.name)
if (item.metadata && item.metadata.plan && item.metadata.plan == this.name)
item.metadata.plan = undefined;
};