Fixed minor bug with Chocolate Egg stat and fixed how undefined was checked (Thanks The_omniscent_pie)

This commit is contained in:
Aktanusa
2014-09-09 20:13:56 -04:00
parent fb83f6679a
commit e5ce8e5ebd
6 changed files with 31 additions and 29 deletions

View File

@@ -251,7 +251,7 @@ CM.Disp.CreateTimerBar = function() {
colorBar.style.borderTopRightRadius = '10px';
colorBar.style.borderBottomRightRadius = '10px';
}
if (bars[i].color != undefined) {
if (typeof bars[i].color !== 'undefined') {
colorBar.className = CM.Disp.colorBackPre + bars[i].color;
}
div.appendChild(colorBar);
@@ -1156,7 +1156,8 @@ CM.Disp.AddMenuStats = function(title) {
choEggTitleSpan.style.verticalAlign = 'bottom';
choEggTitleSpan.textContent = '?';
choEggTitleFrag.appendChild(choEggTitleSpan);
stats.appendChild(listing(choEggTitleFrag, document.createTextNode(Beautify(CM.Cache.ChoEgg))));
var choEggTotal = (Game.cookies + CM.Cache.SellAllTotal) * 0.05;
stats.appendChild(listing(choEggTitleFrag, document.createTextNode(Beautify(choEggTotal))));
}
}
}