Correct missing ! for boolean coercion.

`singularity.workForCompany()` was negating its `_focus` argument, unlike similar functions, which used double-negation to coerce to boolean. This was almost certainly a typo, since before PR-#3967 it used `_ctx.helper.boolean()` without negation, just like the other singularity functions.
This commit is contained in:
MageKing17 2022-08-18 22:04:11 -07:00 committed by GitHub
parent 9c579e294a
commit 28d7284323
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -780,7 +780,7 @@ export function NetscriptSingularity(): InternalAPI<ISingularity> {
function (_companyName: unknown, _focus: unknown = true): boolean {
helpers.checkSingularityAccess(ctx);
const companyName = helpers.string(ctx, "companyName", _companyName);
const focus = !_focus;
const focus = !!_focus;
// Make sure its a valid company
if (companyName == null || companyName === "" || !(Companies[companyName] instanceof Company)) {