diff --git a/src/ui/WorkInProgressRoot.tsx b/src/ui/WorkInProgressRoot.tsx index d43843c85..a2ebf2b24 100644 --- a/src/ui/WorkInProgressRoot.tsx +++ b/src/ui/WorkInProgressRoot.tsx @@ -34,6 +34,18 @@ export function WorkInProgressRoot(): React.ReactElement { const player = use.Player(); const router = use.Router(); const faction = Factions[player.currentWorkFactionName]; + if (!faction) { + return ( + + + + Sorry, Something has gone wrong you cannot work for {player.currentWorkFactionName || "(Faction not found)"} at this time + + + + ) + } + if (player.workType == CONSTANTS.WorkTypeFaction) { function cancel(): void { router.toFaction(faction);