Sneaking through the code, it seems to be an issue with calculateMaxAffordable as it returns 0:
item {baseCost: s, costIncreaseFactor: 1.0001, count: 943085}
lives {s: 1, e: 26, d: Array(3)}constructor: ƒ s(n)d: (3) [908474, 825369, 970790]e: 26s: 1[[Prototype]]: Object
calculateMaxAffordable(item, lives); 0