Fix truck maker crash

This commit is contained in:
thepaperpilot 2022-12-22 12:59:02 -06:00
parent c21a72abe4
commit 25620ad12c

View file

@ -509,7 +509,7 @@ const factory = createLayer(id, () => {
name: "Clothes", name: "Clothes",
imageSrc: _clothes imageSrc: _clothes
}, },
truck: { trucks: {
name: "Trucks", name: "Trucks",
imageSrc: _truck imageSrc: _truck
} }
@ -1299,7 +1299,7 @@ const factory = createLayer(id, () => {
<h5>{title}</h5> <h5>{title}</h5>
{(Object.keys(stockData) as ResourceNames[]).map(res => ( {(Object.keys(stockData) as ResourceNames[]).map(res => (
<div> <div>
{RESOURCES[res].name}:{" "} {RESOURCES[res]?.name}:{" "}
{stockData[res]?.resource != null {stockData[res]?.resource != null
? formatWhole(stockData[res]!.resource!.value) ? formatWhole(stockData[res]!.resource!.value)
: formatWhole(stocks[res] ?? 0)} : formatWhole(stocks[res] ?? 0)}