TYPESAFETY: CompanyName (#650)

This commit is contained in:
Snarling
2023-07-11 09:23:17 -04:00
committed by GitHub
parent e4d3a9020e
commit e2655793f4
40 changed files with 1548 additions and 1516 deletions
+3 -2
View File
@@ -411,7 +411,7 @@ export function WorkInProgressRoot(): React.ReactElement {
cancel: () => Router.toPage(Page.Terminal),
},
title:
`You cannot work for ${Player.currentWork.companyName || "(Company not found)"} at this time,` +
`You cannot work for ${Player.currentWork.companyName} at this time,` +
" please try again if you think this should have worked",
stopText: "Back to Terminal",
@@ -421,7 +421,8 @@ export function WorkInProgressRoot(): React.ReactElement {
const companyRep = comp.playerReputation;
const position = Player.jobs[Player.currentWork.companyName];
const gains = Player.currentWork.getGainRates();
if (!position) return <></>;
const gains = Player.currentWork.getGainRates(position);
workInfo = {
buttons: {
cancel: () => {