diff --git a/app/messages/hooks/use-conversation.ts b/app/messages/hooks/use-conversation.ts index e1ca871..a6804e3 100644 --- a/app/messages/hooks/use-conversation.ts +++ b/app/messages/hooks/use-conversation.ts @@ -8,7 +8,7 @@ export default function useConversation(recipient: string) { {}, { select(conversations) { - if (!conversations[recipient]) { + if (!conversations?.[recipient]) { return null; } diff --git a/app/messages/hooks/use-known-recipients.ts b/app/messages/hooks/use-known-recipients.ts index dc311c0..5bdd9b2 100644 --- a/app/messages/hooks/use-known-recipients.ts +++ b/app/messages/hooks/use-known-recipients.ts @@ -7,6 +7,10 @@ export default function useKnownRecipients() { {}, { select(conversations) { + if (!conversations) { + return []; + } + return Object.keys(conversations); }, }, diff --git a/app/phone-calls/pages/keypad.tsx b/app/phone-calls/pages/keypad.tsx index 39051c2..e533398 100644 --- a/app/phone-calls/pages/keypad.tsx +++ b/app/phone-calls/pages/keypad.tsx @@ -83,7 +83,7 @@ const KeypadPage: BlitzPage = () => {