Skip to content

Commit

Permalink
undefined if no realm found
Browse files Browse the repository at this point in the history
  • Loading branch information
Larkooo committed Dec 12, 2024
1 parent 99d2042 commit f23882e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion client/src/ui/modules/social/PlayerId.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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(() => {
Expand Down

0 comments on commit f23882e

Please sign in to comment.