Fix break upon 0 wrinklers #715

This commit is contained in:
Daniël van Noord
2021-03-22 08:20:52 +01:00
parent 1653c18c55
commit 68c8cc9d54
9 changed files with 24 additions and 32 deletions

View File

@@ -24,8 +24,8 @@ import {
* @param {amount} amount Amount to be bought
* @parem {string} target The target Cache object ("Objects1", "Objects10" or "Objects100")
*/
function CacheBuildingIncome(amount, target) {
const result = [];
function CacheBuildingIncome(amount) {
const result = {};
Object.keys(Game.Objects).forEach((i) => {
result[i] = {};
result[i].bonus = BuyBuildingsBonusIncome(i, amount);