Fix missing check on singularity.getCurrentWork (#971)

This commit is contained in:
TheAimMan 2023-12-09 06:11:46 -05:00 committed by GitHub
parent c6434e2297
commit e957864c4b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1191,7 +1191,8 @@ export function NetscriptSingularity(): InternalAPI<ISingularity> {
enterBitNode(false, Player.bitNodeN, nextBN);
if (cbScript) setTimeout(() => runAfterReset(cbScript), 500);
},
getCurrentWork: () => () => {
getCurrentWork: (ctx) => () => {
helpers.checkSingularityAccess(ctx);
if (!Player.currentWork) return null;
return Player.currentWork.APICopy();
},