fix for fix for fix

This commit is contained in:
Robert Bendun 2021-06-21 13:28:03 +02:00
parent 6c45344475
commit a11dd999df

View File

@ -102,15 +102,17 @@ class Evolution extends Arrangement {
continue;
amount -= this.productsAmount[this.productIndex];
}
const [x, y] = i2gc(this.productIndex++);
const product = Knowledge.semanticNetwork.findProductByName(this.population[this.populationIndex].products[this.productIndex]);
if (!product)
continue;
return {
product,
amount,
x, y
};
try {
const [x, y] = i2gc(this.productIndex++);
const product = Knowledge.semanticNetwork.findProductByName(this.population[this.populationIndex].products[this.productIndex]);
if (!product)
continue;
return {
product,
amount,
x, y
};
} catch (e) {}
}
}