From f23882ecb6aac74a4ec59ec7b31d1374cfaa57b3 Mon Sep 17 00:00:00 2001 From: Nasr Date: Thu, 12 Dec 2024 16:56:14 +0700 Subject: [PATCH] undefined if no realm found --- client/src/ui/modules/social/PlayerId.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/ui/modules/social/PlayerId.tsx b/client/src/ui/modules/social/PlayerId.tsx index f67635aad..1507716fe 100644 --- a/client/src/ui/modules/social/PlayerId.tsx +++ b/client/src/ui/modules/social/PlayerId.tsx @@ -94,7 +94,7 @@ export const PlayerId = ({ SettleRealmData, Array.from(runQuery([HasValue(SettleRealmData, { owner_address: selectedPlayer })]))[0], ); - return formatTime((useUIStore.getState()?.nextBlockTimestamp ?? 0) - (realmSettleData?.timestamp ?? 0)); + return realmSettleData ? formatTime((useUIStore.getState()?.nextBlockTimestamp ?? 0) - (realmSettleData?.timestamp ?? 0)) : undefined; }, [selectedPlayer, playerEntityId]); const playerStructures = useMemo(() => {