This commit is contained in:
Snarling 2022-09-20 06:49:30 -04:00
parent bc7c15ad77
commit db835862d7

@ -23,9 +23,7 @@ interface IProps {
// Create a popup that lets the player manage exports
export function ExportModal(props: IProps): React.ReactElement {
const corp = useCorporation();
const possibleDivisions = corp.divisions.filter((division: Industry) =>
isRelevantMaterial(props.mat.name, division),
);
const possibleDivisions = corp.divisions.filter((division: Industry) => isRelevantMaterial(props.mat.name, division));
if (possibleDivisions.length === 0) throw new Error("Export popup created with no divisions.");
const defaultDivision = possibleDivisions[0];
if (Object.keys(defaultDivision.warehouses).length === 0)