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