From cb2a7ed3dc131897c12d4138cf0ac674b1be8a7b Mon Sep 17 00:00:00 2001 From: bal7hazar Date: Tue, 17 Dec 2024 19:07:38 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fix=20undefined=20deposites?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/src/hooks/helpers/use-resource-arrivals.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/hooks/helpers/use-resource-arrivals.tsx b/client/src/hooks/helpers/use-resource-arrivals.tsx index 9dd7396bd..ef7af8933 100644 --- a/client/src/hooks/helpers/use-resource-arrivals.tsx +++ b/client/src/hooks/helpers/use-resource-arrivals.tsx @@ -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,