Fix display error with 0 cps #754

This commit is contained in:
Daniël van Noord
2021-04-06 11:54:37 +02:00
parent 6ff8ee69f2
commit 210ac67701
4 changed files with 6 additions and 4 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -19,7 +19,9 @@ export function AddAuraInfo(aura) {
const timeToRecover = FormatTime(
priceOfChange / (bonusCPS + Game.cookiesPs),
);
const bonusCPSPercentage = Beautify((bonusCPS / Game.cookiesPs) * 100);
let bonusCPSPercentage;
if (Game.cookiesPs === 0) bonusCPSPercentage = Beautify(Infinity);
else bonusCPSPercentage = Beautify((bonusCPS / Game.cookiesPs) * 100);
l('dragonAuraInfo').style.minHeight = '60px';
l('dragonAuraInfo').style.margin = '8px';