From 0e1929b561c5828b6d792fb2b49c1341bc71b22e Mon Sep 17 00:00:00 2001 From: phyzical Date: Sat, 5 Mar 2022 13:14:28 +0800 Subject: [PATCH] added early out for when it goes wrong here too --- src/PersonObjects/Player/PlayerObjectGeneralMethods.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/PersonObjects/Player/PlayerObjectGeneralMethods.tsx b/src/PersonObjects/Player/PlayerObjectGeneralMethods.tsx index 192c52039..df0d03308 100644 --- a/src/PersonObjects/Player/PlayerObjectGeneralMethods.tsx +++ b/src/PersonObjects/Player/PlayerObjectGeneralMethods.tsx @@ -933,6 +933,8 @@ export function startFactionSecurityWork(this: IPlayer, faction: Faction): void export function workForFaction(this: IPlayer, numCycles: number): boolean { const faction = Factions[this.currentWorkFactionName]; + if (!faction) return false + //Constantly update the rep gain rate switch (this.factionWorkType) { case CONSTANTS.FactionWorkHacking: