Skip to content

Commit

Permalink
Merge pull request #2554 from BibliothecaDAO/fix/-undefined-deposits
Browse files Browse the repository at this point in the history
πŸ› Fix undefined deposites
  • Loading branch information
ponderingdemocritus authored Dec 17, 2024
2 parents 7258c2a + cb2a7ed commit 3187d5a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion client/src/hooks/helpers/use-resource-arrivals.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ const usePlayerArrivals = () => {

const ownedResourceTracker = getComponentValue(OwnedResourcesTracker, id);

const hasResources = ownedResourceTracker?.resource_types !== 0n;
const hasResources = !!ownedResourceTracker && ownedResourceTracker.resource_types !== 0n;

const playerStructurePosition = playerStructurePositions.find(
(structurePosition) => structurePosition.x === position.x && structurePosition.y === position.y,
Expand Down

0 comments on commit 3187d5a

Please sign in to comment.