Skip to content

Commit

Permalink
πŸ› Fix undefined deposites
Browse files Browse the repository at this point in the history
  • Loading branch information
bal7hazar committed Dec 17, 2024
1 parent 7258c2a commit cb2a7ed
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 cb2a7ed

Please sign in to comment.