mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-22 17:23:00 +02:00
CORPORATION: Fix NaN Total Assets caused by bug in bulkPurchase API (#1573)
This commit is contained in:
@@ -336,8 +336,6 @@ export function NetscriptCorporation(): InternalAPI<NSCorporation> {
|
||||
const cityName = getEnumHelper("CityName").nsGetMember(ctx, _cityName);
|
||||
const materialName = getEnumHelper("CorpMaterialName").nsGetMember(ctx, _materialName, "materialName");
|
||||
const amt = helpers.number(ctx, "amt", _amt);
|
||||
if (amt < 0 || !Number.isFinite(amt))
|
||||
throw new Error("Invalid value for amount field! Must be numeric and greater than or equal to 0");
|
||||
const material = getMaterial(divisionName, cityName, materialName);
|
||||
buyMaterial(division, material, amt);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user