diff --git a/src/logic/evolution.js b/src/logic/evolution.js index 36d4dbc..a53887c 100644 --- a/src/logic/evolution.js +++ b/src/logic/evolution.js @@ -103,11 +103,12 @@ class Evolution extends Arrangement { amount -= this.productsAmount[this.productIndex]; } const [x, y] = i2gc(this.productIndex++); - return { - product: Knowledge.semanticNetwork.findProductByName(this.population[this.populationIndex].products[this.productIndex]), + const product = Knowledge.semanticNetwork.findProductByName(this.population[this.populationIndex].products[this.productIndex]); + return product && { + product, amount, x, y - } + }; } }