fix: add ? operator on passkey props

This commit is contained in:
httpjamesm 2023-12-28 16:00:30 -05:00
parent 5c90af1928
commit e54ccebe38
No known key found for this signature in database
2 changed files with 2 additions and 2 deletions

View file

@ -21,7 +21,7 @@ const PasskeyListItem = (props: IProps) => {
}}
startIcon={<KeyIcon />}
endIcon={<ChevronRightIcon />}
label={props.passkey.friendlyName}
label={props.passkey?.friendlyName}
/>
);
};

View file

@ -12,7 +12,7 @@ const PasskeyComponent = (props: IProps) => {
return (
<>
<MenuItemGroup>
{props.passkeys.map((passkey, i) => (
{props.passkeys?.map((passkey, i) => (
<Fragment key={passkey.id}>
<PasskeyListItem passkey={passkey} />
{i < props.passkeys.length - 1 && <MenuItemDivider />}