From 23a68dc287d1be58d4c07056db38ff61121b5f65 Mon Sep 17 00:00:00 2001
From: lowercasedonkey <lowercasedonkey@gmail.com>
Date: Sun, 16 Aug 2020 17:29:59 -0400
Subject: [PATCH] fixes

---
 src/npc/generate/generateGenetics.js | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/npc/generate/generateGenetics.js b/src/npc/generate/generateGenetics.js
index 926149aeee7..87b1229a1a9 100644
--- a/src/npc/generate/generateGenetics.js
+++ b/src/npc/generate/generateGenetics.js
@@ -1143,9 +1143,10 @@ globalThis.generateGenetics = (function() {
  */
 globalThis.generateChild = function(mother, ovum, incubator=false) {
 	let genes = ovum.genetics; // TODO: maybe just argument this? We'll see.
-	let child = {};
+	let child;
 
 	if (!incubator) { // does extra work for the incubator if defined, otherwise builds a simple object
+		child = {};
 		child.genes = genes.gender;
 		setSlaveName(child, genes);
 		setSurname(child, genes);
-- 
GitLab