From ed98a53ee169b26aac14a5c7e9168b54749a7b09 Mon Sep 17 00:00:00 2001 From: Clemente Solorio Date: Sat, 26 Oct 2024 13:26:37 -0700 Subject: [PATCH] fix: state issue with relationship sheet --- src/components/sheets/villager-sheet.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/sheets/villager-sheet.tsx b/src/components/sheets/villager-sheet.tsx index 6d04a9c5..837f1cbc 100644 --- a/src/components/sheets/villager-sheet.tsx +++ b/src/components/sheets/villager-sheet.tsx @@ -113,8 +113,10 @@ export const VillagerSheet = ({ open, setIsOpen, villager }: Props) => { !activePlayer.social || !activePlayer.social.relationships || !activePlayer.social.relationships[villager.name] - ) + ) { + setHearts("0"); return; + } setHearts( Math.floor(