From 5e30c3e48a77ede8ecdb9027cc94c2946ca61476 Mon Sep 17 00:00:00 2001 From: Robert Bendun Date: Mon, 21 Jun 2021 13:07:31 +0200 Subject: [PATCH] fix --- src/logic/evolution.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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 - } + }; } }