Fixed bug with display of missing upgrades

This commit is contained in:
Daniel van Noord
2021-01-25 22:46:08 +01:00
parent 0a57450815
commit 5f93186e7d
2 changed files with 6 additions and 2 deletions

View File

@@ -3889,7 +3889,9 @@ CM.Disp.AddMissingUpgrades = function() {
l('menu').children[5].appendChild(upgrades) l('menu').children[5].appendChild(upgrades)
} }
if (CM.Cache.MissingUpgrades) { if (CM.Cache.MissingUpgrades) {
var normalUpgradesOwned = Game.UpgradesByPool[""].length + Game.UpgradesByPool["tech"].length - l('menu').children[6].childNodes[2].children.length; if (Game.UpgradesOwned) {
var normalUpgradesOwned = Game.UpgradesByPool[""].length + Game.UpgradesByPool["tech"].length - l('menu').children[6].childNodes[2].children.length;
} else var normalUpgradesOwned = 0;
var title = document.createElement('div'); var title = document.createElement('div');
title.id = "CMMissingUpgradesTitle"; title.id = "CMMissingUpgradesTitle";
title.className = "listing"; title.className = "listing";

View File

@@ -2708,7 +2708,9 @@ CM.Disp.AddMissingUpgrades = function() {
l('menu').children[5].appendChild(upgrades) l('menu').children[5].appendChild(upgrades)
} }
if (CM.Cache.MissingUpgrades) { if (CM.Cache.MissingUpgrades) {
var normalUpgradesOwned = Game.UpgradesByPool[""].length + Game.UpgradesByPool["tech"].length - l('menu').children[6].childNodes[2].children.length; if (Game.UpgradesOwned) {
var normalUpgradesOwned = Game.UpgradesByPool[""].length + Game.UpgradesByPool["tech"].length - l('menu').children[6].childNodes[2].children.length;
} else var normalUpgradesOwned = 0;
var title = document.createElement('div'); var title = document.createElement('div');
title.id = "CMMissingUpgradesTitle"; title.id = "CMMissingUpgradesTitle";
title.className = "listing"; title.className = "listing";