added logic to avoid stale object reference on sleeve during augmentation

This commit is contained in:
phyzical
2022-05-03 19:22:05 +08:00
parent 9c805dabb8
commit 0767043166
2 changed files with 7 additions and 5 deletions
+3 -1
View File
@@ -77,7 +77,9 @@ function possibleFactions(player: IPlayer, sleeve: Sleeve): string[] {
}
return factions.filter((faction) => {
const facInfo = Factions[faction].getInfo();
const factionObj = Factions[faction];
if (!factionObj) return false;
const facInfo = factionObj.getInfo();
return facInfo.offerHackingWork || facInfo.offerFieldWork || facInfo.offerSecurityWork;
});
}