fix runtime issue with `addressBookName` not being provided
This commit is contained in:
parent
dd3d09e157
commit
51c05e928d
|
@ -39,10 +39,8 @@ export const getNameFromAddressBook = (
|
|||
}
|
||||
|
||||
export const isValidAddressBookName = (addressBookName: string): boolean => {
|
||||
// TODO: this is filtering names that includes any of the keywords in the `ADDRESS_BOOK_INVALID_NAMES`
|
||||
// So a name in the order of 'This is an unknown user' will be filtered too. Is this intentional?
|
||||
const hasInvalidName = ADDRESS_BOOK_INVALID_NAMES.find((invalidName) =>
|
||||
addressBookName.toUpperCase().includes(invalidName),
|
||||
addressBookName?.toUpperCase().includes(invalidName),
|
||||
)
|
||||
return !hasInvalidName
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue