incorrect ternary

This commit is contained in:
phyzical 2022-03-30 23:33:45 +08:00
parent ab93cfa887
commit 3c991a743c

@ -257,7 +257,7 @@ export function BulkPurchase(corp: ICorporation, warehouse: Warehouse, material:
if (isNaN(amt) || amt < 0) { if (isNaN(amt) || amt < 0) {
throw new Error(`Invalid input amount`); throw new Error(`Invalid input amount`);
} }
if (amt * matSize > maxAmount) { if (amt * matSize <= maxAmount) {
throw new Error(`You do not have enough warehouse size to fit this purchase`); throw new Error(`You do not have enough warehouse size to fit this purchase`);
} }
const cost = amt * material.bCost; const cost = amt * material.bCost;