diff --git a/src/facilities/incubator/incubatorInteract.js b/src/facilities/incubator/incubatorInteract.js index 6b55c73ea3221a1ca3c2c4dbd2ff0ceac972f074..e2b1eb76400dd444db60808394c4bce757cc454d 100644 --- a/src/facilities/incubator/incubatorInteract.js +++ b/src/facilities/incubator/incubatorInteract.js @@ -9,7 +9,6 @@ App.UI.incubator = function() { V.reservedChildren = FetusGlobalReserveCount("incubator"); V.reservedChildrenNursery = FetusGlobalReserveCount("nursery"); - let linkArray = []; let tankOrgans = {}; const el = new DocumentFragment(); const _SL = V.slaves.length; @@ -112,6 +111,7 @@ App.UI.incubator = function() { function mothers() { const el = new DocumentFragment(); let r = []; + let linkArray; const freeTanks = V.incubator - V.incubatorSlaves; r.push(`Reserve an eligible mother-to-be's child to be placed in a tank upon birth. Of ${V.incubator} tanks, ${freeTanks}`); if (freeTanks === 1) { @@ -518,6 +518,7 @@ App.UI.incubator = function() { function PC() { const el = new DocumentFragment(); let r = []; + let linkArray = []; const freeTanks = V.incubator - V.incubatorSlaves; const _WL = V.PC.womb.length; const _reservedIncubator = WombReserveCount(V.PC, "incubator"); @@ -528,7 +529,6 @@ App.UI.incubator = function() { } else { r.push(`${pregNumberName(_WL, 2)}.`); } - linkArray = []; const choices = document.createElement("div"); choices.classList.add("choices"); if (_reservedIncubator > 0) { @@ -707,6 +707,7 @@ App.UI.incubator = function() { function tankBabies() { const el = new DocumentFragment(); let row; + let linkArray; if (V.incubatorSlaves > 0) { App.UI.DOM.appendNewElement("h2", el, `Children in ${V.incubatorName}`);