fix type errors
This commit is contained in:
parent
c9b657e44c
commit
9dea1ed499
@ -8,7 +8,7 @@ export default function useConversation(recipient: string) {
|
||||
{},
|
||||
{
|
||||
select(conversations) {
|
||||
if (!conversations[recipient]) {
|
||||
if (!conversations?.[recipient]) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
@ -7,6 +7,10 @@ export default function useKnownRecipients() {
|
||||
{},
|
||||
{
|
||||
select(conversations) {
|
||||
if (!conversations) {
|
||||
return [];
|
||||
}
|
||||
|
||||
return Object.keys(conversations);
|
||||
},
|
||||
},
|
||||
|
@ -83,7 +83,7 @@ const KeypadPage: BlitzPage = () => {
|
||||
<button
|
||||
onClick={async () => {
|
||||
if (phoneNumber === "") {
|
||||
const lastCall = phoneCalls[0];
|
||||
const lastCall = phoneCalls?.[0];
|
||||
if (lastCall) {
|
||||
const lastCallRecipient =
|
||||
lastCall.direction === Direction.Inbound ? lastCall.from : lastCall.to;
|
||||
|
Loading…
Reference in New Issue
Block a user