From 12330e1f12fc600e283bfe5d81e748743ec28901 Mon Sep 17 00:00:00 2001 From: Martin Fournier Date: Sun, 9 Jan 2022 08:58:13 -0500 Subject: [PATCH] Fix crash when quitting job --- src/PersonObjects/Player/PlayerObjectGeneralMethods.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/PersonObjects/Player/PlayerObjectGeneralMethods.tsx b/src/PersonObjects/Player/PlayerObjectGeneralMethods.tsx index 3990540b0..3764e3d81 100644 --- a/src/PersonObjects/Player/PlayerObjectGeneralMethods.tsx +++ b/src/PersonObjects/Player/PlayerObjectGeneralMethods.tsx @@ -1769,6 +1769,7 @@ export function getNextCompanyPosition( //return the player's "nextCompanyPosition". Otherwise return the entryposType //Employed at this company, so just return the next position if it exists. const currentPositionName = this.jobs[this.companyName]; + if (!currentPositionName) return entryPosType; const currentPosition = CompanyPositions[currentPositionName]; if ( (currentPosition.isSoftwareJob() && entryPosType.isSoftwareJob()) ||