Fix error introduced in 95b0a8d9bf while fixing a warning

This was SVN commit r15034.
This commit is contained in:
Adrián Chaves 2014-04-27 15:56:10 +00:00
parent 63bcf2fef6
commit 60334f05c8

View File

@ -177,7 +177,7 @@ function updateBuildingPlacementPreview()
function findGatherType(gatherer, supply)
{
if (!("resourceGatherRates" in gatherer) || !supply)
if (!("resourceGatherRates" in gatherer) || !gatherer.resourceGatherRates || !supply)
return undefined;
if (gatherer.resourceGatherRates[supply.type.generic+"."+supply.type.specific])
return supply.type.specific;