mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-11 02:03:58 +01:00
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:
parent
9c579e294a
commit
28d7284323
@ -780,7 +780,7 @@ export function NetscriptSingularity(): InternalAPI<ISingularity> {
|
|||||||
function (_companyName: unknown, _focus: unknown = true): boolean {
|
function (_companyName: unknown, _focus: unknown = true): boolean {
|
||||||
helpers.checkSingularityAccess(ctx);
|
helpers.checkSingularityAccess(ctx);
|
||||||
const companyName = helpers.string(ctx, "companyName", _companyName);
|
const companyName = helpers.string(ctx, "companyName", _companyName);
|
||||||
const focus = !_focus;
|
const focus = !!_focus;
|
||||||
|
|
||||||
// Make sure its a valid company
|
// Make sure its a valid company
|
||||||
if (companyName == null || companyName === "" || !(Companies[companyName] instanceof Company)) {
|
if (companyName == null || companyName === "" || !(Companies[companyName] instanceof Company)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user