Merge pull request #4010 from Risenafis/fix-create-corp

NETSCRIPT: Correct missing ! for boolean coercion in Corporation.createCorporation().
This commit is contained in:
hydroflame 2022-08-23 12:10:49 -03:00 committed by GitHub
commit 6969ff52c7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -976,7 +976,7 @@ export function NetscriptCorporation(): InternalAPI<NSCorporation> {
(ctx: NetscriptContext) => (ctx: NetscriptContext) =>
(_corporationName: unknown, _selfFund: unknown = true): boolean => { (_corporationName: unknown, _selfFund: unknown = true): boolean => {
const corporationName = helpers.string(ctx, "corporationName", _corporationName); const corporationName = helpers.string(ctx, "corporationName", _corporationName);
const selfFund = !_selfFund; const selfFund = !!_selfFund;
return createCorporation(corporationName, selfFund); return createCorporation(corporationName, selfFund);
}, },
hasUnlockUpgrade: hasUnlockUpgrade: